cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic checkboxes

Former Member
0 Kudos

I have 2 checkboxes.I want to show if first checkbox is selected then only second will be visible.I have written following code

View xml

   <CheckBox text="APO" selected="{Apo}" id="cbk3" change="oncbch"/>

<CheckBox text="MM" selected="{Mm}" id="cbk7"/>

Controller View

oncbch:function(oControlEvent)

   {

   debugger;

   var state  = oControlEvent.getParameters().state;

   this.byId("cbk7").setVisible(!state);

   },

but its not woking Please help

Accepted Solutions (1)

Accepted Solutions (1)

santhu_gowdaz
Active Contributor
0 Kudos

  this.byId("cbk7").setVisible(this.getView().byId("cbk3").getSelected());

Answers (0)