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

How do I identify or highlight text fields AND radio buttons that are not filled in when you click Submit?

New Here ,
Feb 26, 2016 Feb 26, 2016

I have a form where I am making text fields and radio buttons "required". However, when you click the Submit button that I created, it only gives a message stating that certain required fields are not filled in. How do I make the message identify or highlight the text fields AND radio buttons that are not filled in? I've been banging my head against the wall for 3 days looking for this answer. I know it probably has to be done using a Javascript, but i actually know nothing about Javascript. Can someone help me with the script and tell me where I need to place it to make this work. Any help will be appreciated.

TOPICS
Acrobat SDK and JavaScript , Windows
442
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 ,
Feb 26, 2016 Feb 26, 2016

This comes up at least once a week.

There are certain commands the will automatically check this but the results are not very user friendly.

You will need to write some custom JavaScript to do this. The logic is to access each field in the form and test if the "Required" property is true. Then compare the field's value to the defaultValue of the field and if they are equal, the required field has not been completed. You can now issue an alert or accumulate the field name for reporting after completing testing all of the 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
New Here ,
Feb 26, 2016 Feb 26, 2016
LATEST

I agree. I do need a custom Javascript action. Unfortunately, I do not know Javascript. I'm good at creating these documents but not so good at making them do what I want them to.  I know, in my head, what I want it to do, but i have no idea how to translate that into a workable Javascript. That's where I need the help. I need something that i can copy and paste, if there is someone who would be kind enough to provide that for me. I'm very new to all of this. 

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