Difference between revisions of "Custom Save and Save Draft Buttons"
From SmartWiki
(updating categories) |
|||
(10 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
* '''Label''' - the text that will appear on the button when exposed to end users. | * '''Label''' - the text that will appear on the button when exposed to end users. | ||
* '''Description''' - descriptive text. | * '''Description''' - descriptive text. | ||
− | * '''Script''' - call to any scripts that should be run in conjunction with this button. The system will check if the script is present before trying to run it. Submit button script must be formatted as ''functionName(this.form)''. Spaces are not permitted. Script should return either '''true''' or '''false'''. | + | * '''Script''' - call to any scripts that should be run in conjunction with this button. The system will check if the script is present before trying to run it. Submit button script must be formatted as ''functionName(this.form)''. Spaces are not permitted. Script should return either '''true''' or '''false'''. |
+ | :'''Important:''' If a '''''Submit Button Script''''' has been defined the button will run that function, and will '''NOT''' ensure that [[mandatory]] fields are completed. | ||
* '''URL''' - specify the URL the user should be redirected to following successful submission. '''NOTE:''' Redirects must be relative path (e.g. /wiki/index.php) rather than an absolute path (e.g. http://www.smartsimple.org/wiki/index.php). | * '''URL''' - specify the URL the user should be redirected to following successful submission. '''NOTE:''' Redirects must be relative path (e.g. /wiki/index.php) rather than an absolute path (e.g. http://www.smartsimple.org/wiki/index.php). | ||
* '''Visibility Condition''' - any [[Visibility Condition|conditions]] used to control when the button is exposed. | * '''Visibility Condition''' - any [[Visibility Condition|conditions]] used to control when the button is exposed. | ||
Line 18: | Line 19: | ||
|Save | |Save | ||
| | | | ||
− | * This button validates all fields in the record, ensuring that mandatory fields and formatting | + | * This button validates all fields in the record, ensuring that mandatory fields and formatting requirements are satisfied. |
* Clicking the Save button does not change the current status. | * Clicking the Save button does not change the current status. | ||
+ | * [[Submit Logic]] is not available on Save buttons. | ||
|- | |- | ||
|Save Draft | |Save Draft | ||
Line 25: | Line 27: | ||
* Save Draft saves the record, but performs NO validation. | * Save Draft saves the record, but performs NO validation. | ||
* This button should always be used in conjunction with at least the Submit button. | * This button should always be used in conjunction with at least the Submit button. | ||
+ | * [[Submit Logic]] is not available on Save Draft buttons. | ||
|- | |- | ||
|Submit | |Submit | ||
| | | | ||
− | * The Submit button validates all fields in the record, ensuring that mandatory fields and formatting | + | * The Submit button validates all fields in the record, ensuring that mandatory fields and formatting requirements are satisfied. |
* It saves the record and changes the status to the status defined in the '''Submit Button Status''' section of the original status. | * It saves the record and changes the status to the status defined in the '''Submit Button Status''' section of the original status. | ||
* ''Note that the label on the Submit button can be defined in the '''Submit Button Label''' section of the status page, so may appear with another name.'' | * ''Note that the label on the Submit button can be defined in the '''Submit Button Label''' section of the status page, so may appear with another name.'' | ||
− | + | * [[Submit Logic]] can be set on Submit buttons. | |
|} | |} | ||
Line 38: | Line 41: | ||
[[Image:SelectingNoDefaultButtonOnStatus.png|link=]] | [[Image:SelectingNoDefaultButtonOnStatus.png|link=]] | ||
− | [[Category:Universal Tracking Application]][[Category:Validation]] | + | ==See Also== |
+ | * [[Status]] | ||
+ | * [[Submit Buttons]] | ||
+ | |||
+ | [[Category:Universal Tracking Application]][[Category:Validation]][[Category:Process Flow]] |
Latest revision as of 15:26, 23 October 2017
If Save Button or Save Draft Button is selected on the Type of a Submit Button, the configuration settings will slightly differ from other Submit Buttons.
The following settings will be configurable:
- Order - the order in which the button will appear on the screen, with lower numbers appearing further to the left of the screen.
- Label - the text that will appear on the button when exposed to end users.
- Description - descriptive text.
- Script - call to any scripts that should be run in conjunction with this button. The system will check if the script is present before trying to run it. Submit button script must be formatted as functionName(this.form). Spaces are not permitted. Script should return either true or false.
- Important: If a Submit Button Script has been defined the button will run that function, and will NOT ensure that mandatory fields are completed.
- URL - specify the URL the user should be redirected to following successful submission. NOTE: Redirects must be relative path (e.g. /wiki/index.php) rather than an absolute path (e.g. http://www.smartsimple.org/wiki/index.php).
- Visibility Condition - any conditions used to control when the button is exposed.
The Save and Save Draft buttons differ from Submit Buttons in the following manner:
Button | Description |
Save |
|
Save Draft |
|
Submit |
|
When custom Save and Save Draft buttons are configured in this fashion, the system's default Save/Save Draft buttons can be hidden on the status by changing the Display Buttons setting on the status in question: