- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2018 05:07 AM
Hi All,
I have a field 'Justification' which is a conditional mandatory field, and it's a drop down list from where a user can select a choice. When the 'Justification' field is not mandatory, 'none' is the default choice and the user can submit the form.
The issue is that when 'Justification' is mandatory, if the user just clicks on the drop down list and selects 'None', they're able to submit the form. Is there a way to prevent this and force the user to select a choice from the drop down list before submitting?
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2018 06:57 AM
Hi,
Below is what I did:
1. Wrote a onChange client script:
2. Out Put Risk is not mandatory
2. OnChange when value is 2 for Priority
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 04:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 06:00 AM
Hi Upender,
It's working fine for a catalog item but I can't do this way since mine is a change request form. Is there any way I can try ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 06:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 06:23 AM
Could you please paste the script. It's not visible in the screenshot.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2018 06:24 AM
Hi Upender,
Does your script work for conditional mandatory field with drop down list? Below is my script which makes the 'Justification' conditional mandatory.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '' ) {
return;
}
if ( newValue == 'f5e13c10381912009a283555e485af6d') //emergency CR
{
g_form.setMandatory('u_justification', true);
}
//Type appropriate comment here, and begin script below
}
Thank you