Expand my Community achievements bar.

Problem with the dropdown list

Avatar

Level 2

Hi,  I am using adobe live cycle designer version 8.2.while designing the form i have to achieve the followinf scenario:

I have a drop down field 'Type' having 4 values  say : A,B, C,D.

If user selects Type= A >>> textfield A-Value should appear and textfield B-Value should dis-appear

If user selects Type= B >>> textfield B-Value should appear and textfield A-Value should dis-appear

In all other cases both the fields should be hidden and their value should be reset.

I am not able to achieve this. I have written the following code:

if (this.rawValue=="Fixed")

{

(xfa.resolveNode("service-configuration.mainSubForm.payment-component.component.value_sub").presence)

= "visible";

(xfa.resolveNode(" service-configuration.mainSubForm.payment-component.component.class-sub").presence)

= "hidden";

xfa.host.resetData(" service-configuration.mainSubForm.payment-component.component.class-sub.class-name");

}

else

if(this.rawValue=="Calculated")

{

(xfa.resolveNode(" service-configuration.mainSubForm.payment-component.component.class-sub").presence)

= "visible";

(xfa.resolveNode("service-configuration.mainSubForm.payment-component.component.value_sub").presence)

= "hidden";

xfa.host.resetData("service-configuration.mainSubForm.payment-component.component.value_sub.value");

}

else

{

(xfa.resolveNode(" service-configuration.mainSubForm.payment-component.component.class-sub").presence)= "hidden";

(xfa.resolveNode("service-configuration.mainSubForm.payment-component.component.value_sub").presence)

= "hidden";

xfa.host.resetData("service-configuration.mainSubForm.payment-component.component.value_sub.value");

xfa.host.resetData("service-configuration.mainSubForm.payment-component.component.class-sub.class-name");

}

Please suggest if my script is incorrect.

Thanks

1 Reply