I'm building a questionnaire feature and the screen is supposed to look something like this:
I'd like for the "Continue" button to be enabled only once one choice is selected from the list of options (RadioButton
). However, I can't figure out how to access the selection state of the radio button and update the enable status of the Continue button.
My first attempt:
Create a local component state variable on the RadioButtonComponent
called isOptionSelected
And the corresponding action to set the variable bound to the "On Select" of the RadioButton:
The challenge here is that isOptionSelected
does not seem to be exposed to the Button widget. That is, there's no "Component State" option (like the "Page State" one) available in the source variable selector for the button's Disable Options:
I looked around further and thought I'd find the variable under the "Widget State" option but expanding it leads to something else that I don't understand much:
which further leads to more confusing options, as in: what does "Access Type" actually mean? I thought the pre-defined component variable should just be available somewhere here...
What am I missing here, and/or how would you implement the desired behavior?
Additional/background info:
The choice list is implemented as a RadioButton
wrapped in a component, to avoid this error as discussed here and here:
RadioButton widget with the current configuration will not function properly when generated dynamically at the moment (because it is associated with a local state variable). Consider wrapping it inside of a component and then generate the component dynamically.