Disable Client Side Valiation(mandatory field checking) on "Save as draft" - Is this the best practice
I am looking for some guidance to know whether it is best practice or not in implementing the below requirement :
1. Request form - Requestor will be having an option to create the Request form. In the Request form - there are so many fields in which most of the fields are mandatory. There are two buttons provided at the bottom of the screen. One is "Save as Draft" and the other is "Submit". By default up on click on any button there will be client side validation(when client side validation is enable at harness and flow action level) and will check for mandatory fileds.
Save as Draft -> is to temporarily save the data entered in the screen to the work table. Here if user didn't fill the mandatory fields and click on "Save as Draft", system is forcing the user to fill the mandatory fields other wise its not allowing to save. Business don't want to fill the form completely as it makes sense by the name "Save as Draft".
I managed this by disabling the "Client Side Validation" using a customized function in the js page and calling the same using "Run Script" only on the "Save as Draft". With this whatever the data entered by the user will be save irrespective whether mandatory fields were entered or not.
I would like to know is this the best practice of saving null/blank values in to the work table(either optimized column or not) even though we marked the fields as mandatory in the form.
Appreciate your kind guidance here.
***Edited by Moderator Marissa to update platform capability tags****
Keep up to date on this post and subscribe to comments
- After clicking on the "Save as" button, then the rule which has saved having some User interface issue in Pega 7.2
- "Save original Email (in EML format)" of the listener, not saving the email as work case attachment
- How to remove "Save Preferences" button in a listview report
- How to skip the default validations when "save and close" is pressed in a partially completed screen
- Academy course System Arch Essentials.........exercise issue. Unable to successfully "save and run"