I'm working on a SharePoint form, we have both global validation like required fields and custom validations. The user wants to use the Save button to save the form without performing any validation and a custom Submit button to trigger both custom and global validations. Is there a way to prevent validation on Save, and only have the form validated on the Submit button click.
Hello @Zusbry,
Welcome to Plumsail Community!
When the field is required in the SharePoint, it is not possible to make it not required in the form.
You can make all fields optional, and validate them in the form using custom validators.
And you can create a button that will remove all custom validators and then save the form. For this, you need to use this code in the button's OnClick settings:
//remove all custom validators
fd.validators.length = 0;
//save the form
return fd.save();
Hi @mnikitina,
Thanks, good to be here.
We will consider this alternative, thank you very much for the suggestion.
1 Like