I have 3 buttons and two buttons must to be disabled if I select one of the 3 butttons.
I tried with the follow code on disabled property:
a!buttonArrayLayout( buttons: { a!buttonWidget( icon: "check", size: "LARGE", value: local!buttonVal = 2, style: "DESTRUCTIVE", disabled: if(local!buttonselected = true, if(local!buttonVal = 1, "SECONDARY", false), false), submit: a!save(local!buttonselected, true) ) }, align: "CENTER" )
Discussion posts and replies are publicly visible
a!localVariables( local!btnSelected, { a!buttonArrayLayout( buttons: { a!buttonWidget( icon: "check", size: "LARGE", style: "DESTRUCTIVE", saveInto: { a!save(local!btnSelected, 1) }, disabled: contains({ 2, 3 }, tointeger(local!btnSelected)) ), a!buttonWidget( icon: "check", size: "LARGE", style: "DESTRUCTIVE", saveInto: { a!save(local!btnSelected, 2) }, disabled: contains({ 1, 3 }, tointeger(local!btnSelected)) ), a!buttonWidget( icon: "check", size: "LARGE", style: "DESTRUCTIVE", saveInto: { a!save(local!btnSelected, 3) }, disabled: contains({ 2, 1 }, tointeger(local!btnSelected)) ) }, align: "CENTER" ) } )
Please try this code. I save the value for each button as 1,2 and 3 and according to these values i set the disability logic for the buttons.
It works, but just disabled the button number one and it doesn't let me choose another one.
The 3 buttons must be enabled.
I made a few changes on the code, I created 7 local variables because I have 24 buttons and every row is different
Thank you a lot,
Yes, Based on the requirement we can change the disable condition.