New demo for dynamic form fields
A few days ago I wrote a post to demonstrate how I was adding form fields dynamically with the use of AJAX and Mootools.
I have now created a new demo that further demonstrates the flexibility of this system.
This demo includes a select box from which you can select an optional question type.
If you choose the “Multiple choice” option it then loads a default set of 3 options to which, at the click of a button, more can be added.
As I mentioned in the last post, all the form fields are defined in an extertanal php file which is called via ajax. This way it is easier to manage than adding the form elements to the javascript, especially if you want to call the form field options (such as for a select list) dynamically from a database.
chris@cbolson.com
There are 6 comments in this article: