- 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-23-2018 08:32 AM
Hi,
For this you have to add blank option by onload script and set that value.
g_form.addOption('yourvariable','','',0);
g_form.setValue('yourvariable','','');
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2018 09:05 AM
Hi Upender,
onLoad script didn't work 😞
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2018 09:26 AM
Hi,
I have tested:
function onLoad() {
//Type appropriate comment here, and begin script below
var v=g_form.getValue('u_options');
//alert(g_form.isNewRecord());
//g_form.setValue('u_options','');
g_form.addOption('u_options','','',0);
g_form.setValue('u_options','','');
}
Please share screen and code if you can.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 01:20 AM
Thanks Upender. It works just fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 03:34 AM
Hi Upender,
I've set my list choices in Form Design. Did you set 'add', 'remove' choices in Form Design too?
Thanks