|
Form ElementsThis topic lists the elements that can be added to a form in a Web page or in a Capture OnTheGo template and explains how to add them to a Form, set a default value or change their validation. For more information about Forms, see Forms. For more information about elements in Forms, see http://www.w3schools.com/html/html_forms.asp. FieldsetA fieldset is a group of related elements in a form. The elements don't have to be of the same type. After inserting and selecting the Fieldset (see Selecting an element) you can add elements to it in the same way you add elements to a Form; see Form Elements. TextThe Text element is a simple <input> element with the type The Email element is a text input field that accepts only email addresses in a valid format. URLThe URL element is a text input field that accepts only URLs (a web page address) in a valid format. PasswordThe Password element is a password field that accepts any alphanumerical characters. When the user types in this field, characters are shown as asterisks only. NumberThe Number element is a text field accepting only numbers. DateThe Date element is a text field accepting only dates in a valid format. Text areaThe Text area element is a text field accepting multiple paragraphs. You can set a number of rows when adding the Text Area to the Form, and change it on the Attributes pane. Hidden fieldA hidden field can contain specific data used by the server-side script. It is not visible to the user. When adding a Hidden Field you can set the value that will be sent on submit. LabelA Label element is a text displaying
informative text within the form. Labels are non-interactive. CheckboxA Checkbox element sends information to
the server whether it is checked (true) or not (false). When adding a Checkbox you can set its initial state and its value. The contents of the value property do not appear in the user interface. If a Checkbox is in checked state when the form is submitted, the If a Checkbox is not checked, no information is sent when the form is submitted. Fortunately, there is a workaround to submit the status of an unchecked checkbox; see Form Elements. Radio Button GroupA Radio Button Group is not an input element itself. Rather it is a group of Radio Buttons that have the same Radio ButtonA radio button sends information to
the server whether it is selected (true) or not (false). When adding a Radio Button you can set its initial state and its value. The contents of the value property do not appear in the user interface. If a Radio Button is in selected state when the form is submitted, the If a Radio Button is not checked, no information is sent when the form is submitted. Fortunately, there is a workaround to submit the status of the unchecked radio button, see Form Elements. The SelectA Select element is a drop-down list with multiple entries from which the user can select only one option. When adding a Select to a Form you can type the options to be given in the drop-down list and the values related to them. Only the value of the selected option will be sent to the server on submitting the form. To learn how to dynamically add options to a Select element, see this how-to: to Dynamically add options to a dropdown. ButtonThe Button element is an element that can be clicked. When adding a Button to a Form you can set the button's type:
There may be multiple submit buttons on a Form. If this is the case, specify a different Note: When adding a Button to a Form, you can specify a value, but no name. The Button's ID will be copied to the element's |
|