DeerSteak
DeerSteak

Reputation: 121

Dynamically enable options in Genero Mobile RADIOGROUP

I'm working in Genero Mobile on an app for iOS and Android. On one screen is a form with a RADIOGROUP. That RADIOGROUP can have only 3 options that are turned on and off by a web service. I'm already collecting the state of those radio options, but I need to tell the form to hide specific radio options if they're not allowed by the web service. So I have something like this:

RADIOGROUP rad_type = formonly.rad_type, ITEMS=((1,"1stChoice"),(2,"2ndChoice"), (3,"3rdChoice")), ORIENTATION=HORIZONTAL;

In the code I have fetched those states and I'm ready to apply them to the options in the radio group, but I don't know how and the 4Js Genero BDL manual isn't helping.

Upvotes: 0

Views: 220

Answers (1)

fourjs.reuben
fourjs.reuben

Reputation: 326

As per Genero Developers Forum:

This is actually not possible, RadioGroup items don't have the hidden attribute at all. Also modifying dynamically the RadioGroup list of items could lead into rendering/layout issues.

You could use a ComboBox instead. And using the ui.ComboBox class you can then add or remove items dynamically with the addItem()/removeItem() methods.

Upvotes: 0

Related Questions