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.
<fm:Form_TextInput name="firstname" value="Xzibit" />
Name | Required | Default | Description |
---|---|---|---|
autocomplete | Optional | N/A | This sets the non-standard autocomplete attribute for this textfield. This is supported in a few popular browsers |
class | Optional | The css classname that will be assigned to the actual html form field. Note that a few default classes might be added | |
disabled | Optional | N/A | This will set the html disabled attribute |
id | Optional | randomized | The id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component |
label | Optional | N/A | This attribute will be used to generate labels for this component, if it's used within an fm:Form component |
language | Optional | N/A | This specifies which language to use for the display of the form_country dropdown. Choices are:
|
maxlength | Optional | N/A | The maximum length for this input field |
name | Required | N/A | The name of the form field. This is how the value will be submitted back to the server |
onblur | Optional | N/A | Sets the onblur attribute on the element |
onchange | Optional | N/A | Sets the onchange attribute on the element |
onfocus | Optional | N/A | Sets the onfocus attribute on the element |
onkeydown | Optional | N/A | Sets the onkeydown attribute on the element |
readonly | Optional | N/A | This sets the html readonly attribute and controls if the user can change the value |
required | Optional | 0 | Set required to '1' if you'd like the form validator to check if this form element has a value before submitting |
size | Optional | N/A | Sets the size attribute on the field. It is recommended to use css instead |
style | Optional | The style attribute for the actual form component | |
title | Optional | N/A | Sets the title attribute on the input element |
value | Optional | The current value of the form element |
Most of the attributes you see here are just passed through to the actual input field.
<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: