- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2014 09:22 AM
For variables where I've checked the "include none" option, is there any way to tell when they picked none? It doesn't look like the onChange method is called when that happens. I'm wanting to hide some variables, for example, if they switch from a valid answer back to none
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2014 09:28 AM
Hi,
In onChange script, you can check the value of field like below:
if(g_form.getValue('field') != '')
Generally. blank value is return if you select -- None --
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2014 09:28 AM
Hi,
In onChange script, you can check the value of field like below:
if(g_form.getValue('field') != '')
Generally. blank value is return if you select -- None --
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2014 09:32 AM
Also Scott, you will have to make sure it is not a user created choice 'None', it should be the 'Include none' option so that you can compare it to blank.
Thanks & Regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2014 09:42 AM
It looks like onChange is being called, and with a newValue, but the newValue is blank, like you said. So I can basically do this:
if (isLoading || !newValue || newValue.toString().length == 0) {
// Either the page is first loading, or they've put the answer back to -- None --
}