I'm creating a simple 'Yes/No' select droplist. I thought the select
tag accepted a hash. But, it doesn't show any items when I view it.
This is the code in Markaby 0.5.
For a boolean state object I suggest one of two approaches....
1. A checkbox or
2. two radio buttons.
In your case, it sounds like you really need to put in a checkbox
I use the radio button approach when the states match to a small set of
mutually exclusive states that don't neatly map to a true/false.
Things like 'gender' are a good example.
I'm creating a simple 'Yes/No' select droplist. I thought the select
tag accepted a hash. But, it doesn't show any items when I view it.
This is the code in Markaby 0.5.
There must be an obvious error in there somewhere, I'm just not seeing it.
select_tag takes: name for params, options for popup, html options. So you have an extra argument slipped in there, and you should really use options_for_select to build the options string. try:
(typed into mail, apologies in advance for the errors)
From a user interface perspective, a 'select' for a yes/no question is
a bad idea.
From the survey design PoV, any binary (Yes/No) question has four possible and appropriate responses:
Yes;
No;
Don't know;
not applicable.
Plus also:
Not Answered.
For a boolean state object I suggest one of two approaches....
1. A checkbox or
2. two radio buttons.
In your case, it sounds like you really need to put in a checkbox
I use the radio button approach when the states match to a small set of
mutually exclusive states that don't neatly map to a true/false.
Things like 'gender' are a good example.
Most binary survey questions fall into the same camp. From the UI perspective, popups/dropdowns are biased towards the first option, the one that shows by default.