Click
Click Examples

Source Viewer : /form/dynamic/dynamic-form.htm

This example demonstrates how to dynamically add fields to a form.
<ul>
    <li>
        The form is submitted using the JavaScript statement, <tt>form.submit()</tt>,
        which is set as the Checkbox <tt>onclick</tt> handler. Clicking the checkbox
        will submit the form. On the server, Form
        <tt>validation</tt> is switched off through, <tt>Form.setValidate(false)</tt>.
    </li>
    <li>
        The utility method <tt>ClickUtils.bind(Control)</tt> is used to bind
        and inspect the checkbox value <tt>before</tt> the page onProcess event.
    </li>
    <li>
        If the checkbox is checked, the email field is added to the form
    </li>
</ul>

<hr/>

$dynamicForm

#if ($msg)
  <div id="msgDiv"> $msg </div>
#end