Copy link to clipboard
Copied
Hi,
I have some adobe pdf forms - i alreday set all fields as required fields But still it allows users to save the form with some blank fields. Can someone give me a validations script that i can add so they cannot save a form with any blank field.
Regards,
Geet
Copy link to clipboard
Copied
A user may have many good reasons for wanting to save his form and finish filling it in later.
So rather than trying to prevent this, an elegant programmer should simply alert the user via an alert box.
See these topics:
Copy link to clipboard
Copied
Hi JR, thanks alot for replying. Actually i am not really a programmer but i can copy paste and use some codes. I just send pdf that i want the user to save and send back to me with filled in information. I used the code in the link you suggested - but that does not trigger and alert - upon saving that you must fill all fields. I just need a code that can go in validation - that user must not be able to leave it blank when saving. its a simple form with afew fields - so fillling later is not needed.. if nothing works - i can just simply add a note on the form that - all fields are mandatory
Copy link to clipboard
Copied
The required property is only used when the file is submitted. You said you want the user to send the form back to you. At that moment, if they use a button set to submit the form, it will validate the those fields and not allow the form to submit if they are not filled in.
If you want to also perform this validation when the file is saved you will need to use a script, like this (paid-for) one I've developed: https://www.try67.com/tool/acrobat-validate-required-fields-before-printing-or-saving
Note it can't actually stop the file from saving, but it can force the saved copy to be blank, and to display an error message to the user.