I'm stuck in database design . I have to show HTML form fields with specify that which fields are mandatory or not and visible or not from database for so many forms.
I have to put that option for configuration in admin panel. So, Admin select forms and fields and checked that it's mandatory or not / visible or not and that configuration is set for that specific user.
Note :- Only if the user changed the configuration otherwise they must come from default configuration.
Database Design for Form Table,
form_id - int(11) form_name - Varchar(255) screen_ame - Varchar(255) Field Table,
field_id - int(11) field_name - Varchar(255) form_id - int(11) form_field Relation Table,
field_id - int(11) user_id - int(11) mandatory - enum('1', '0') visible - enum('1', '0') So, from these three tables I can get all data that gives forms data and which also includes that which field is mandatory and visible.
But , I'm stuck in this logic that forms fields are only changed(setting overwrite) when user changed the configuration otherwise they must come from default configuration.
