Copy link to clipboard
Copied
I am currently using Acrobat to create a new document.
According to the instructions in the link below, I need to create a table with columns and designate certain columns as required and others as optional. However, I noticed that even though I have set some columns as required, users can still click "save" without filling in these required fields.
Is there a notification mechanism to alert users if they forget to fill in a required field?
https://helpx.adobe.com/tw/acrobat/using/pdf-form-field-properties.html
Copy link to clipboard
Copied
Hi @MediaTek Inc.22143206voz7,
Thank you for your question, and I appreciate the clarity in your explanation.
You’re correct — marking form fields as “Required” in Acrobat ensures validation only when the form is submitted using a button that triggers a submit action (like SubmitForm() or a custom JavaScript check). Unfortunately, simply clicking “Save” or closing the file won’t trigger a warning, even if required fields are empty. This behavior is expected and consistent with Acrobat’s current design.
Additionally, third-party PDF viewers or browsers may not fully support these form behaviors, especially custom JavaScript or validation logic. For the most consistent experience, we recommend instructing users to open the form using Adobe Acrobat or Adobe Reader.
To actively notify users if they skip required fields, you can:
Add a custom Submit button to your form.
Attach a JavaScript validation script that checks required fields before allowing submission.
Here’s a simple example you can adapt:
var missingFields = [];
var requiredFields = ["Name", "Email", "Date"]; // Replace with your actual field names
for (var i = 0; i < requiredFields.length; i++) {
var f = this.getField(requiredFields[i]);
if (f && f.value === "") {
missingFields.push(requiredFields[i]);
}
}
if (missingFields.length > 0) {
app.alert("Please complete the following required fields:\n" + missingFields.join("\n"));
} else {
// Proceed with submission or saving
app.alert("All required fields are filled. Thank you!");
}
This approach ensures users see a prompt before finalizing the form.
~Tariq
Copy link to clipboard
Copied
If you want to validate the required fields before saving (or printing), you can use this (paid-for) tool I've developed:
https://www.try67.com/tool/acrobat-validate-required-fields-before-printing-or-saving
It won't prevent the file from being printed, but will force the fields in the printed (or saved) copy to be blank.
Copy link to clipboard
Copied
"users can still click "save" without filling in these required fields"
Fortunately, because a user may have many good reasons for wanting to save a form before completing it in full:
- go to lunch
- go to a meeting
- finish the next day
- respond to an urgent request
- fire alarm
- network or power cut alert
Etc.
Copy link to clipboard
Copied
May the Portuguese and Spaniards forgive me, I forgot about the unexpected total power outage.
But in that case, only battery-powered computers leave enough time to save.
😉