jFormer Documentation → jFormer Structure →
JFormer(String id, [, Array optionArray])
The jFormer object is the wrapper and controller for all parts of the form, any of its options are those that either effect the entire functionality of the form itself, or effect every component within it.
new JFormer(String id, [, Array optionArray])
Create a simple form with a title and change the default submit button text:
$sampleForm = new JFormer('id', array(
'submitButtonText' => 'Submit
'title' => 'Sample Usage Object
',
));
These options are specific to the JFormer object.
debug_backtrace()
path as a string | This is the action of the form, it should point back to the PHP file that created the form, so you can validate your form and access your onSubmit funciton. if you change it, make sure it is the path to the correct file.
"onSubmit"
string | The name of the function that processes the form, see Processing Submissions for more information
"Submit"
string | The text that shows up on the submit button of the form (remember that if you have multiple pages this will only show up on the final page of the form, other pages will have the text "next")
"Processing..."
string | The text that shows up on the submit button while the form is processing server side (only shows up after you click the submit button and the form is processing)
true
boolean | If enabled, will allow jformer alerts to show up when called (see jFormer Alterts Page for more information on alerts
true
boolean | If disabled, turns off the javascript validation of components, useful for debugging.
false
boolean | If enabled, the submit button is not disabled while the form is processing to prevent multiple submissions, and the iframe that submits the form is set to display:block
true
boolean | If disabled, tip content will not be updated with validation errors when validating. validation will still occur
false
boolean | If pageNavigator is true, it enables the page navigator for multipage forms, rather than a boolean you can also submit an options object to change the defaults for this, see the pageNavigator page for more information.
false
boolean | If splashPage is true, it enables the splash page, a landing page for your form, rather than a boolean you can also submit an options object to change the defaults for this, see the splashPage page for more information.
| Name | Default Value | Description |
These Methods are specific to the JFormer object. for building the form, (PHP only)
Object | jFormPage Object the jFormPage to add to jFormer.
Adds a page to the jFormer Object.
Array | jFormPage Objects the jFormPage to add to jFormer.
Adds an array of pages to the jFormer Object.
Object | jFormSection Object the jFormPage to add to jFormer.
Adds a section directly to the jFormer Object. Rather than the section being added to the page, an 'anonymous' jFormPage object is created for the section to be added to.
Object | jFormComponent Object the jFormPage to add to jFormer.
Adds a component directly to the jFormer Object. Rather than the component being added to a section, an 'anonymous' jFormSection object is created for the section to be added to.
Array | jFormComponent Objects the jFormPage to add to jFormer.
Adds a component directly to the jFormer Object. Rather than the component being added to a section, an 'anonymous' jFormSection object is created for the section to be added to.
These Methods are specific to the JFormer object. for customizing the form, (Javascript only)
Checks all dependencies on the form, if a component has a dependepency, those conditions will be checked.
String | The ID of the jFormComponent you wish to select.
Searches the form for the specific jFormComponent by ID. Returns a jFormComponent Object, or false if the Object is not found.
Gathers the values of all components from the form and places them in a JSON object. returns JSON Object.
Object | Object of values to be set.
set the values of all components in the form from the object . returns JSON Object.
Next Page: jFormPage
This page was last edited on April 22, 2011 at 4:13am.