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

Make a Radio Button mandatory

Contributor ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

Hello

 

I have a form which has 2 x Radio buttons (Yes / No) These need to be filled out. I don't want the customer to carry on without selecting an option.

Is there some Java Script I can add, please?

 

Many thanks

TOPICS
JavaScript , PDF forms

Views

764

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 ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

This is a bad idea. "Locking" the user into a field will cause nothing but irritation. If you want to "force" them to make a selection you can define the field as required and then the file won't be submitted until the field is filled-in.

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
Contributor ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Many thanks for replying...

 

... but if I do want the user not to skip these buttons, is there some javascript to make these buttons mandatory?

 

Thank 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
Contributor ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Hello again. I've defined the field as Required. But I can save the Acrobat Reader PDF and email it. So the file can be submitted even if this field isn't filled in.

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 ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

LATEST

If you add a button with the "Submit a Form" command that should not be the case.

The user will always be able to manually attach the form to an email and send it to you, of course.

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