Changes

Status

267 bytes added, 22:24, 23 July 2009
Submit Button Script (Level 1 Only)
===Submit Button Script (Level 1 Only)===
In order to use the Submit Button Script you <u>must</u> select a '''Submit Button Status''' so that the '''Submit''' button will appear.<br>* ''You must also create a [[Browser Script]] containing a JavaScript function that is called within the 'IMPORTANT:''' When you have defined a Submit Button Script the Submit button will '''NOT''' cause the status to be changed. Instead it runs the script/function defined heresetting. * This feature can be used to create a [[Custom Field Type: Special – Browser Script|Browser Script]] that will perform tasks, such as custom validation of the data on the page, and can then optionally change prior to submission. * The function must return either a value of '''true''' if the status record should be submitted; or execute '''false''' if the submit function as part of the scriptrecord should not be submitted.* Standard field and Custom Field validation is performed '''after''' this script is run if , provided that the function has returned '''true'''. If the value function returns '''truefalse'''no further validation is performed and the record is <u>not</u> saved/submitted.
* You can optionally re-label the Submit button using the '''Submit Button Label''' setting).
 
For example, if your Browser Script contains a function called ''custombsubmit'' you would put the following into the '''Submit Button Script''' section:
:[[Image:Bsf.png]]
The following sample of a [[Browser Script]] will prompt the user to confirm if they want to submit the record.
0
edits