- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2016 10:44 AM
I want to display a message when the user selects I am not sure.
Currently the message displays no matter which choice is made
I am not sure how to select the choice that I want so that the message populates.
This is the script that I am using
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
g_form.showFieldMsg('why_form_needed','If you are not sure why the form is needed, please verify with supervisor','info');
}
Finally I want to deny submitting the form until that choice changes to New Form or Update existing form.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2016 07:50 PM
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(g_from.getValue("why_form_needed")=="actual value of select box choice"){
//Type appropriate comment here, and begin script below
g_form.showFieldMsg('why_form_needed','If you are not sure why the form is needed, please verify with supervisor','info');
return false;
}
}
please try the above code and replace the "actual value of select box choice" of "I am not sure" question choice in the variable "why_form_needed".
Let me if this helps.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 07:22 AM
Hi Blaze
At line 6 it is g_form not g_from
Thanks
Adi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 07:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 08:08 AM
Hi blaze
try adding this befor if condition
g_form.hideFieldMsg('why_form_needed',true);
Thanks,
Adi