Skip to main content
Participating Frequently
February 23, 2022
Answered

How do I make the dropdown required by not allowing the "Please Select Option" as selected answer

  • February 23, 2022
  • 2 replies
  • 7213 views

Greetings!

May you please help me on how do I make the dropdown required and not allowing the "Please Select Option" as the selected option by the user.

Please see attached screenshot:

 

Thank you and hoping for your reply.

 

This topic has been closed for replies.
Correct answer Thom Parker

Set that field as required and then use this script as 'Validation' of that same field:

event.target.required = event.value == "Please Select Option" ? true : false;


A submit will be blocked when a field is both required and set to it's default value.  So make "Please Select" the default. I don't see any need for the script. 

 

 

 

 

2 replies

try67
Community Expert
Community Expert
February 23, 2022

You will need to validate the selection using a script, before sending the file.

Is this the only field you want to check, or are there more?

Participating Frequently
February 23, 2022
Hi Felicy,

Kindly find attached.

Thank You
Participating Frequently
February 23, 2022

Furthermore, this should not allow the user to submit the form unless it has met the requirement.

 

Thank You