Make a Radio Button mandatory

Explorer ,
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

36

Likes

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
Most Valuable Participant ,
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.

Likes

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
Explorer ,
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

Likes

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
Explorer ,
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.

Likes

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
Most Valuable Participant ,
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.

Likes

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