RapidContext
Access > Discovery > Insight
www.rapidcontext.com
Extends:
RapidContext.Widget
The form widget class. Provides a grouping for form fields, using the
<form> HTML element. The form widget supports form reset, validation
and data retrieval.
Source code:
RapidContext_Widget_Form.js
RapidContext.Widget.Form(attrs)
Creates a new form widget.
|
fieldMap()
Returns a map with all child DOM nodes containing form fields with
a name attribute.
|
|
fields()
Returns an array with all child DOM nodes containing form fields.
|
|
reset()
Resets all fields in the form to their default values.
|
|
update(values)
Updates the fields in this form with a specified map of values.
|
|
validate()
Validates this form using the form validators found.
|
|
Resets all form validators.
|
|
Returns an array with all child DOM nodes containing form validator widgets.
|
|
valueMap()
Returns a map with all form field values.
|
JavaScript:
var field = RapidContext.Widget.TextField({ name: "name", helpText: "Your Name Here" });
var attrs = { name: "name", message: "Please enter your name to proceed." };
var valid = RapidContext.Widget.FormValidator(attrs);
var exampleForm = RapidContext.Widget.Form({}, field, valid);
User Interface XML:
<Form id="exampleForm">
<TextField name="name" helpText="Your Name Here" />
<FormValidator name="name" message="Please enter your name to proceed." />
</Form>