cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

I want to reset the option button values based on another option button value

Jump to solution

I have a option button with 3 values.

Based on the each value i am loading a panel with controls in it.

i want to reset the values in the panel when the option button value is changed to different value.

Eg:  Option button

Value 1--- Panel1(controls)

Value2---Panel2(controls)

When value1 is changed to value 2 i want to reset the controls in panel one.

Labels: (1)
0 Kudos
Reply
13 Replies
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

to set 'Option 1' checked you can

NWF$("#"+varControl).find("input[value='Option 1']")[0].checked=true

Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

I am looking to reset values in the panel when another choice is selected.

Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

you have to do 'reset' per every single control, there is no general function that would do it for all the controls in a panel.

since you named the topic "I want to reset the option button values" I provided an example for option buttons. if you need for another controls, please specify exactly what you need.

Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

I have 3 panels with multiple option buttons in each panel. A single panel loads based on the value of the option button selected. But when the option button value is changed i want to reset the values option buttons in the panel.

Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

I am using the below to reset the values to default value but i am unsuccessful

NWF$(document).ready(function(){ 

var obj = NWF$("#" +Choices); 

obj.change(function(){

NWF$("#" + TextBox ).val('');

} );

} );

Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

if you correctly set up javascript variables for your Chioces and TextBox controls your code should work.

do you get any error on developer console?

Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

Can you help me with javascript set up as i am unable to move forward on this.

I am using the javascript in the form setting custom java script section and enabling the javascript client id to yes and providing the javascript variable to all the controls.

Thanks in advance.

0 Kudos
Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

that all sounds to be correct.

I've just taken your script and copy&paste it to my custom javascript (with no change).

then I placed a choice control on the form and configured javascript variable to 'Choices'

similarly I did for 'TextBox'

when I ran the form

and changed an choice option, text box got correctly cleared

0 Kudos
Reply
Workflow Hero

Re: I want to reset the option button values based on another option button value

Jump to solution

Thanks for the help.

But I wanted it for the option box instead of text box.

And i figured it out and it all worked.

Thanks again for your support

0 Kudos
Reply