Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Hidden/Visible fields

Avatar

Level 1

I am stuck on one thing. 

I have a radio button that is clicked that will bring up certain fields.  I have included the hidden/visible fields that work just fine. 

I have a check box further down that when clicked brings up certain fields based on the radio button mentioned. I have hidden the fields and coded to hide the fields and show the fields where necessary.  But, I need the fields related to the checkbox to execute the same instructions as the radio button.  If 1 is true for the radio button, I need it to show for the fields at the top and also for the fields at the bottom.  At this point, if I have it visible for the radio button then it is visible for the checkbox regardless of what I input there.  I really hope this makes sense.  Not quite sure how to explain this.

Thank you!

Coding for the radio button:

if(this.rawValue=="1")

   {

FORM.Main.sfConventional.tblChecklist.B2Ince.presence = "hidden";

FORM.Main.sfConventional.tblChecklist.B2Incf.presence = "hidden";

   }

  else

   {

FORM.Main.sfConventional.tblChecklist.B2Ince.presence = "hidden";

FORM.Main.sfConventional.tblChecklist.B2Incf.presence = "hidden";

   }

For the checkbox:

if (this.rawValue=="1")

{

FORM.Main.sfConventional.tblChecklist.B2Ince.presence = "visible";

FORM.Main.sfConventional.tblChecklist.B2Incf.presence = "visible";

}

  

else

{

FORM.Main.sfConventional.tblChecklist.B2Ince.presence = "hidden";

FORM.Main.sfConventional.tblChecklist.B2Incf.presence = "hidden";

}

0 Replies

Avatar

Level 9

Hi,

I am also not clear what are you trying to explain here.  What am assuming here is you want to execute the same code in the CheckBox as that of radioButton. In that case you can call the event of the RadioButton in the Click/Change event of the CheckBox.

Lets say you have written the code in the Change event of the RadioButton.

In the change event of the checkbox you can write the following code.

RadioButton1.execEvent("change");

Thanks,

Bibhu.