Return to default value when ui policy returns false.

imran rasheed
Tera Contributor

I have yes/no type fields with in catalog and i have also set default value as none by checking the tick box.

Here i have a ui policy, where this yes/no field gets enabled when another field ("B") is chosen and user chooses yes or no.

When user selects someother value in ("B") field, this yes/no should come to default "none". How to achieve this?

Is there any return false script to be written?

9 REPLIES 9

asifnoor
Kilo Patron

create a onchange client script on B field and in that write

if(newValue == "someother") {

g_form.clearValue("your_field");

}

Mark the comment as a correct answer and helpful if it helps.

Is there any way to write it in ui policy return false statement?

If you have this

find_real_file.png

Reversing of field would work for this, but it doesn't bring the value to default.