jFormer Documentation → Advanced Fields →
JFormComponentName(String id, String label[, Array optionArray])
The Name field allows users to enter in their first and last name, with the middle initial being optional.
new JFormComponentName(String id, String label[, Array optionArray])
Create an date component:
$address = new JFormComponentName('id', 'Label:', array());
Object
Keys: { firstName, middleInitial, lastName }
.jFormComponentName
true
Boolean | turns off the input fields sublabels if false. Useful when emptyValues are set to true to prevent redundancy..
false
Boolean | Places an empty value in each of the text input fields so that the labels are shown inline, when true.
false
Boolean | hides the middle initial field if set to true.
null
Array Keys: [firstName, middleInitial, lastName] | Receives an associative array which presets the value for these components. .
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 | Description |
| required |
Makes the component required, the entered value may not be white space or empty. only the firstName and lastName field are required. if middleinitial is shown it is never required. First Name is required. Last Name is required.
'validationOptions' => array('required')
|
Next Section: Form Features
This page was last edited on April 25, 2011 at 1:38pm.
3 comments (add a comment)
soccerjf on 2011-08-21 10:13:38
when you pass the array use "initialValues" vs "initialValue", add the "s"
OgdenRoyal on 2011-11-09 05:27:45
Also, the example for this page is a date object. Not 'Name'. And the comment submission 'cancel' button reads "previous"
'showSubLabels' should be 'showSublabels' (labels needs to be lowercase)