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

Highlight incomplete required fields

New Here ,
Jan 10, 2022 Jan 10, 2022

Unfortunately, I do not know javascript and I've tried a couple I've found online and they give me errors.

I have required fields on a form that must be submitted.  If any required fields are blank, it will give an error alerting the user that the a required field is blank.  That's good, but the form is 9 pages.  So, the user has difficulty finding the required field.  I would like to highlight these fields to make it easier.

 

Thank you in advance for your help.

TOPICS
How to , JavaScript , PDF forms
1.6K
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 ,
Jan 10, 2022 Jan 10, 2022

You can set their fill color, or stroke color, or even set the focus to (one of) them.

If you post your code and let us know which of these options you want to implement, we could help you do it.

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 ,
Jan 10, 2022 Jan 10, 2022

Unfortunately, I don't have any code.  I tried to copy and paste some code from the forums into the Mouse Up>Run a JavaScript, but the code gave errors and I'm honestly not sure it will do what I want.

Basically, I want them to click the button, and then before it submits the form it will loop through and highlight or fill color the required fields that were not completed.  I have text fields, radio buttons and check boxes.  There may be a way to do it without javascript.  Unfortunately, I am a novice and was unable to find the answer on Google.

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 ,
Jan 10, 2022 Jan 10, 2022
LATEST

If you use the built-in Submit Form command it will validate requires fields, although not radio-buttons and check-boxes, and inform of the user if any of them are not filled in. To highlight them you would need to use a script, including the submit part. Search the forums for "validateRequiredFields" and you'll find a function I've posted that does just that.

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