Amy's Devblog

A blog containing information on all my work/education projects.

Thursday, January 12, 2006

More Dynamic Forms

I expanded the Dynamic Forms Edit tool to add a capability for a user to define certain form elements as linked so that, depending on the user's answer to a question, other form elements are either displayed or hidden. The tool lets the user define which elements are linked to a particular question, and whether or not to show or hide each linked element for each possible answer to the question. When the form is saved, this information is converted to an XML string representation of the link details and saved as a property of the question. When a user requests a particular form, the XML data is parsed and used to generate Javascript code to handle the display/hiding of linked elements. This generated Javascript is placed in the form header and a call to the generated function is placed in the question's onclick/onchange event handler.

0 Comments:

Post a Comment

<< Home