fm:Form_TextInput


This component represents a <input type="text" /> field. Use this component instead of the standard html one to leverage the layout and validation features of the fm:Form component.

Example

<fm:Form_TextInput name="firstname" value="Xzibit" />

Supported attributes

NameRequiredDefaultDescription
autocompleteOptionalN/AThis sets the non-standard autocomplete attribute for this textfield. This is supported in a few popular browsers
classOptionalThe css classname that will be assigned to the actual html form field. Note that a few default classes might be added
disabledOptionalN/AThis will set the html disabled attribute
idOptionalrandomizedThe id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component
labelOptionalN/AThis attribute will be used to generate labels for this component, if it's used within an fm:Form component
languageOptionalN/AThis specifies which language to use for the display of the form_country dropdown. Choices are:
  • en - English
  • es - Spanish
  • fr - French
  • nl - Dutch
maxlengthOptionalN/AThe maximum length for this input field
nameRequiredN/AThe name of the form field. This is how the value will be submitted back to the server
onblurOptionalN/ASets the onblur attribute on the element
onchangeOptionalN/ASets the onchange attribute on the element
onfocusOptionalN/ASets the onfocus attribute on the element
onkeydownOptionalN/ASets the onkeydown attribute on the element
readonlyOptionalN/AThis sets the html readonly attribute and controls if the user can change the value
requiredOptional0Set required to '1' if you'd like the form validator to check if this form element has a value before submitting
sizeOptionalN/ASets the size attribute on the field. It is recommended to use css instead
styleOptionalThe style attribute for the actual form component
titleOptionalN/ASets the title attribute on the input element
valueOptionalThe current value of the form element

Most of the attributes you see here are just passed through to the actual input field.

See also

More examples

<fm:Form> <fm:Form_TextInput name="firstname" value="Snoop" label="First name"/> <fm:Form_TextInput name="lastname" value="Dogg" label="Last name"/> </fm:Form>

This will display: