To implement a feature to make an widget visible on click on Yes radio button and the widget should disappear if the No radio button is clicked

0
  Onclick of a radio button ie, Yes a widget which is below the radio buttons should be visible, again Onclick of a radio button ie., No the same widget should disappear.
asked
2 answers
0

Hi Kushal

 

You can create an boolean attribute i.e. ‘shouldShow’. Then create an on click event for the radio button and call a nanoflow. In the nanoflow, if the value of the radio button is set to ‘yes’ → set ‘shouldShow’ to true and end the nanoflow, if the value of the radio button is set to ‘no’ → set ‘shouldShow’ to false and end the nanoflow. 

Then set the visibility of the widget that you want to show when ‘yes’ is picked to only show when ‘shouldShow’ is true.

 

I think this should work.

Lenny

answered
0

You can do this with conditional visibility on the widget you want to hide or show.

If the radio button points to a boolean attribute, use that value in the conditional visibility of the widget.  If the radio button points to an enumeration, you should use that attribute to control visibility.  I’ve pasted an example below using a boolean attribute:

answered