- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 07:47 AM
I currently have a select box and for the default value I have it as "-- Please Select --" but I also need this field to be mandatory field. When testing the red asterisk is there but if the field is left blank and the person submits the form anyway it still allows them to submit without filling in the mandatory fields.
Can someone point me in the right direction on how to fix this issue?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 10:53 AM
Hey Craig,
you can add an onSubmit client script:
function onSubmit() {
//Type appropriate comment here, and begin script below
var v = g_form.getValue('select');//the name of your field
if(v == '-- Please Select --') {
alert('You must choose an option in the select field');
return false;
}
}
NOTE -
In place of "--Please Select --" put the value of that choice.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 11:16 AM
No use this
var v = g_form.getValue('Name of that Question');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 11:18 AM
I have done this and it still does not make the user fill in the question. All it does is highlight the variable on the form for a half second then lets the user submit.
Thank you,
Craig Zeleznick

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 11:27 AM
Remove the Asterisk Sign That means Remove MANDATORY then it will work.
Because you are making Mandatory through onSubmit Script.