Dynamic form creation
Hi all,
Does anyone know if it is possible using dreamweaver, php and mysql to create a web form dynamically dependant on which database fields are active?
Basically, I have a survey table to collect the data and an active fields table. What I wish to do is have the survey form entry page change automatically dependant on which fields are marked active in the 'active fields' table.
e.g.:
Survey Table:
- Survey Item 1
- Survey Item 2
- Survey Item 3
Active Fields Table:
- Survey Item 1 - True
- Survey Item 2 - False
- Survey Item 3 - True
In the above example a form would be created showing only Survey Items 1 & 3. If 2 was set to true, then the form would show survey items 1, 2 & 3. The created form should allow the user to be able to enter the relevant data which is then saved back to the database.
To make things slighty more complex, it would be great if these fields could be placed in particular areas of the page depending on category type:
e.g.:
Survey Item 4 is added and belongs to Survey Item 1's category (defined in the Active fields table), so would therefore show as;
Survey Item 1
Survey Item 4
Survey Item 2
Survey Item 3
Any ideas, pointers, links or vids would be gratefully received. Thanks in advance.
Regards
Paladindc