jFormer DocumentationjFormer Structure

jFormComponent

The jFormComponent object is the most basic and important building block of jFormer. Each specific type of component type extends this object and is never used directly. These options and methods are generic to all component types.

Usage

Constructor

    new JFormComponent[Type](String id, String label[, Array optionArray])
    

Sample Usage

Create a Single Line Text component with a tip:

    $singleLineText = new JFormComponentSingleLineText('id', array(
        'tip' => '

Sample Tip.

' ));

a jFormerComponet can be added directly to a form, page or section. using the method -> addJFormComponent or addJFormComponentArray

Component List

For options and methods specific to each component type, please visit that component's page.

Component Options

These options are common to all components.

null

description

HTML | a description for the component, shows underneath the component inside a DIV with the class jFormComponenpescription.

null

instanceOptions

Array, [max(int), addButtonText(string), removeButtonText(text)] | see instanceOptions page for more information.

null

dependencyOptions

Array, [dependentOn(string), display(string), jsFunction(Javascript)[, animationOptions(array)]] | see dependencyOptions page for more information.

null

triggerFunction

Javascript | a javascript function that runs upon component change.

null

tip

HTML | a tooltip that displays whenever the component has focus. Gives any extra help or explanation a form user might need.

null

validationOptions

Array | an of validations specific to the component, see the specific component for its validations.

false

showErrorTipOnce

Boolean | this option makes the error tip only show up on the first focus on the component if it does not pass validation.

false

enterSubmits

Boolean | if true pressing enter while this component has focus submits the form, or advances to the next page.

null

style

CSS | set the style attribute for the component wrapper div.

null

initialValue

String | preset the value of the component upon form loading.

jFormComponent PHP Methods

These Methods are generic to all JFormComponent objects.

NameArgumentsDescription

jFormComponent Javascript Methods

These Methods are generic to all JFormComponent objects.

NameArgumentsDescription

Next Section: Basic Fields

This page was last edited on April 11, 2011 at 11:10am.

0 comments (add a comment)