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

Question on forcing a field to be entered on a form

Participant ,
Jan 07, 2025 Jan 07, 2025

Copy link to clipboard

Copied

Wondering if it's possible to force someone to fill in a certain field on a form before they can move along filling out the rest of the form.  I wrote a Java script that will take them to line i want to be filled out but it would be nice if i can keep them from moving on filling out the rest of the form until the line is complete.  I know could do a pop up alert but it would be nice to prevent going any further until the cell is completed.  does this make sense?

TOPICS
JavaScript , Modern Acrobat , PDF , PDF forms

Views

92

Translate

Translate

Report

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
1 ACCEPTED SOLUTION
Community Expert ,
Jan 07, 2025 Jan 07, 2025

Copy link to clipboard

Copied

Enter the following as an On Blur JavaScript in the actions tab of the field:

if(!event.value){event.target.setFocus()}

View solution in original post

Votes

Translate

Translate

Report

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 ,
Jan 07, 2025 Jan 07, 2025

Copy link to clipboard

Copied

Enter the following as an On Blur JavaScript in the actions tab of the field:

if(!event.value){event.target.setFocus()}

Votes

Translate

Translate

Report

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
Participant ,
Jan 07, 2025 Jan 07, 2025

Copy link to clipboard

Copied

PERFECT!!

Votes

Translate

Translate

Report

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 ,
Jan 07, 2025 Jan 07, 2025

Copy link to clipboard

Copied

LATEST

This is technically possible, but a very bad idea. What if they wanted to save and close the file? Or if they entered the field by accident and want to move away from it? Preventing them from doing it can cause a lot of issues. If you implement this you can expect angry calls from your users, I can assure you.

Votes

Translate

Translate

Report

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