Need help to enable/disable features for users with checkboxes

For users I need to be able to turn on/off different features through out the site.

From a list of users, I want to go to a specific users feature page, where I can select the features for that user.

On the page (see image), it will be checkboxes where you select or unselect "features"for that one user.

I have made a “features table”, but I`m not sure if that is the right way to do it.

Also do I have to make a update action for each checkbox or is there another way.

Hi @steen

I can’t see how the features table will link to the users. I would consider either putting the feature fields into the users table so their values are stored along with the rest of the user data or add a field in the features table which stores the user id. Make sure it’s unique so you don’t have more than one record per user.

You can either update everything when the form is submitted or put actions on the checkboxes to update as they are clicked. The first way is easiest but the second way might give a better user experience.

Hope that helps.

EDIT: Is the uid_fk field the link to the users table? If so, you should be good to go with the second option I gave.