How to select an answer option in a Listview (radio-like selection) when using Mendix 11.3?
0
Hi everyone,I’m building a quiz/exam app in Mendix 11.3. I have a Listview that shows multiple answer options for one question.My goal: user can select only 1 answer (like a radio button). Problem: The default RadioButton widget requires an enum, but I cannot use enum here because my answer options are dynamic records from database. If I use Listview + Dynamic Text, I can show the answer text (A. This is the answer…), but I cannot select only one record like radio behavior. I also want the layout to be: A. This is answer text (same line) But with enum + radio, Mendix shows the label separately and I can’t append dynamic text after that. Question:✅ How can I allow the user to select exactly 1 item in Listview, and also show the answer text on the same line? Any recommended widget or or is there any other way? Thank you!
asked
hdat
1 answers
1
Hello Hdat,
Let a Dataview listen to your Listview. Your Listview will then have the behavior you wish. Only 1 item selectable. For your layout you have to a add a class name to your Listview and add some CSS for this class.