An object contain all I18N (internationalization) language keys and the corresponding values, such as the error message that shows up when a required field is left blank.
The model for the current form with the validation rules etc. as set in the XIMA form designer.
An object that contains all the RegExp
s for the different data types of input fields provided by plugins. The
key is the ID of the validation rule (see Formcycle.XmFormPluginVRule.key).
An object that contains all the RegExp
s for the different data types of input fields.
A reference to the form validator. It may be used to interact with the validation process, such as listening to certain events during the validation process.
The current ID of the form. null
when no form exists.
Retrieves the value of the named URL parameter. In case a parameter is specified multiple times, only the value of the first occurence is returned.
If the URL is as follows:
https://formcloud.de/formcycle/form/provide/9999?name=James&preview&mode=&name=John
Then this function returns:
getURLParameter("name"); // => "James"
getURLParameter("preview") // => undefined
getURLParameter("mode"); // => ""
getURLParameter("other"); // => undefined
Name of the URL parameter to retrieve.
The value of the URL parameter with the given name, or undefined
if no such URL parameter exists.
A FORMCYCLE form may consist of multiple pages. This function lets you change to another page. You may also specify whether navigation should be prevented in case the current page is invalid (eg. due to required fields that are still blank).
// Go to page 2, but only if all form fields on the current page are valid
gotoPage("p2", true);
// Go to page 2 and do not check any form fields
gotoPage("p2");
The name of the page to goto. This is the name given to the page in the designer.
Set to true
to prevent the page change in case the current page is invalid. Set to false
to
perform the navigation irrespective of whether the current page is valid.
Lets you disable or enable form validation. If validation is disabled, the form may be submitted event if it is invalid (eg. when it contains required fields that are still blank).
Note that even if form validation is enabled, a client may still submit the form if they disable JavaScript or setup an appropriate HTTP request. To prevent this, you may want to enable server side validation in the designer.
Set to false
to disable form validation. Set to true
to enable form validation.
This object contains meta data related to the currently opened form; such as the state of the form, the user that is currently signed in, the the form record and much more.
To access this information via JavaScript, use the global JavaScript object
window.XFC_METADATA
. When you open a form, this object is added automatically and filled with the relevant information.