This example demonstrates how to dynamically add fields to a form through a
select control.
-
The form is submitted using the JavaScript statement, form.submit(),
which is set as the Select onchange handler. Changing the select
option will submit the form. On the server, Form
validation is switched off through, Form.setValidate(false).
-
The utility method ClickUtils.bind(Form) is used to bind
and inspect the Select value before the page onProcess event.
-
If the selected value is "Property", an address fieldset is added to the form.
If the selected value is "Stocks", an amount field is added to the form.
$dynamicForm
#if ($msg)
$msg
#end