jFormer Documentation → Basic Fields →
JFormComponentTextArea(String id, String label[, Array optionArray])
The Text Area field is a multi-line input field that accepts text. This form field is best used for long answer, free form questions such as, "Can you describe the animal that attacked you?"
new JFormComponentTextArea(String id, String label[, Array optionArray])
Create a simple textarea component with a tooltip:
$textArea = new JFormComponentTextArea('id', 'Label:', array(
'tip' => 'This is a tooltip on a Textarea component.
',
));
String
.jFormComponentTextArea
These options are specific to the JFormComponentTextArea object.
false
determines | determines whether or not the input field is disabled. A disabled input element is unusable and un-clickable.
null
string | Receives a string which will be displayed in the input field until the user focus on it. If the user leaves the field empty and tabs away, the empty value will display again. Empty values are not passed to the server for processing.
false
string | Receives a boolean, either true or false, which determines whether or not the input field is read only. A read only input element cannot be modified. However, a user can tab to it, highlight it, and copy the text from it.
off
string | Receives a string, either 'hard' or 'off', if set to hard, enables the wrap property on the text area.
false
boolean | if set to true, tabbing while within the textarea will indent rather than tab to the next form component.
false
boolean | if set to true, the textarea will become larger as more and more lines are added to it.
null
string | Receives a string, like '20px' or '6em', which is set as the CSS width value on the input element. Alternatively, you may pass any of the following strings and they will translate to CSS em values.
null
string | Receives a string, like '20px' or '6em', which is set as the CSS width value on the input element. Alternatively, you may pass any of the following strings and they will translate to CSS em values.
These options are common to all components.
null
HTML | a description for the component, shows underneath the component inside a DIV with the class jFormComponenpescription.
null
Array, [max(int), addButtonText(string), removeButtonText(text)] | see instanceOptions page for more information.
null
Array, [dependentOn(string), display(string), jsFunction(Javascript)[, animationOptions(array)]] | see dependencyOptions page for more information.
null
HTML | a tooltip that displays whenever the component has focus. Gives any extra help or explanation a form user might need.
null
Array | an of validations specific to the component, see the specific component for its validations.
false
Boolean | this option makes the error tip only show up on the first focus on the component if it does not pass validation.
false
Boolean | if true pressing enter while this component has focus submits the form, or advances to the next page.
null
CSS | set the style attribute for the component wrapper div.
null
String | preset the value of the component upon form loading.
| Name | Error Message and Description |
| required |
"Required." Makes the component required, the entered value may not be white space or empty. |
Next Section: Advanced Fields
This page was last edited on April 25, 2011 at 10:57am.
4 comments (add a comment)
Is it possible to have a MaxLenght as Validation Options for Textarea fields?
Edward Meshuris on 2012-02-03 19:12:06
Min length would be great....
ip[;[;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\
cool