Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I want to create required fields.

New Here ,
May 31, 2017 May 31, 2017

I want to create required fields. I would like an alert to pop up when a required field has not been filled in. Cannot save form without filling in the required fields.

Please provide easy to follow directions.

Thanks!

TOPICS
Acrobat SDK and JavaScript , Windows
682
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2017 May 31, 2017

It's not possible to prevent the file from being saved entirely. You can display an error message or even force the fields in the saved file to be blank, but that's a bit extreme.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 31, 2017 May 31, 2017

This is a form that follows chemotherapy regimen. Very specific to each patient. I would like the end user to have some required fields, i.e. DOB, Name, Research ID# etc., but if those fields are not filled in then when hitting the "Save" or "Save As" option, an alert will pop up stating required fields to be filled out before saving - something to that effect.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2017 Jun 01, 2017

I've developed a tool that allows you to set it up very easily. You can find it here: Custom-made Adobe Scripts: Acrobat -- Validate Required Fields Before Printing or Saving

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2017 May 31, 2017

You can fire off a script that will run when the document is about to close, when the document is about to save, and when the document was saved. However, you cannot prevent these actions from happening based on the results of that code. Can you explain how the patient gets the form back to you? Email, submit button etc..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 01, 2017 Jun 01, 2017

The form is uploaded to a folder on a shared drive. This form will be filled out by medical personnel to keep track of treatments that a patient receives. There a few fields that are required and I would like to facilitate the best possible workflow. Filling out these particular fields is essential in ensuring that the treatment is on the right patient, therefore requiring name, ID, DOB, signatures is important. I would like the end user to be alerted before closing the form that there are required fields that have to be filled out.

Thanks for your help

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2017 Jun 01, 2017

In that case, try67 has a good solution. See above.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 01, 2017 Jun 01, 2017
LATEST

One could also a visible read only field that displays the fact that the required fields are not completed and oce completed the message could be hidden.  This will require some custom scripting and might not work with mobile devices.. PDF forms also have an application preference to highlight form fields that includes setting a colored border around required form fields.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines