Yes/No variable with none

march
Kilo Guru

Hi,

We have a variable in one of our record producer of Type "Yes/No" and selected the "include none" option to force user to fill something in (we also set it to mandatory).
We now have the need to clear that variable when another field value is set.
I tried to use a client script using the clearValue method and expected the value of the variable to be set back to "none" (forcing the user to select yes or no), but this seems not to work

How can this be achieved?

Thanks
Marc.

3 REPLIES 3

Mark Stanger
Giga Sage

Something like this should work...

g_form.setValue('your_variable_name', '');


Stupid me 🙂

I tested this and it was not working...due to a typo (so i thought that was not working with the "with none" option set).
It is working now, thanks Mark

Do you have an idea on why:
g_form.clearValue('your_variable_name');
Is not working?


Not sure. It may be some sort of version or browser issue because I just tested it successfully on demo022 from Chrome.