Formwidget
Templating System : Designer Guide : Tag Reference : FormwidgetSummary
The formwidget tag is used to position a form element in a dynamic form template. The element itself must be created in the Tcl script associated with the template.
Usage
<formtemplate id="add_user"> <table> <tr> <td>First Name</td><td><formwidget id="first_name"></td> </tr> <tr> <td>First Name</td><td><formwidget id="first_name"></td> </tr> </table><br> <input type="submit" value="Submit"> </formtemplate>
Notes
The formwidget tag takes the place of input and select tags in static HTML forms. The system substitutes these tags with the appropriate HTML tags, complete with their proper values, options and other attributes, while rendering the template. Explicit form tags in the template may be used in special circumstances, but should be avoided wherever possible.
-
HTML attributes may be specified as attributes to the formwidget tag. The system will include all such attributes in the input or select tag of the rendered HTML form. Although possible, newer browser security features such as CSP discourage the use of inline Javascript event handlers.
<formwidget id="cc_number" style="background-color:white;">
See the formtemplate and formgroup tags for more information on writing the body of a dynamic form template.