Scripsit William Gill:
Quote:
I have a simple registration form that needs a binary answer (one or
the other) in several places, using radio buttons. |
For a binary choice, a single checkbox is often preferable, though then
you need a useful, meaningful default choice, and you won't be able to
distinguish between users who skipped the question and users whose
answer coincides with the default. It's still probably the best approach
for things like
[ ] You may pass my contact info to advertizers.
where an explicit permission by the user is required anyway (assuming we
want to act morally and, in many countries, by the law).
There's also the possibility of using a text input box, e.g.
<div><label>Sex (M for male, F for female):
<input type="text" name="sex" size="1"></label></div>
This makes the form a bit faster to fill out, for people who know how to
work with the keyboard. Admittedly, clickable buttons might be what most
of the clicking generation is accustomed to. But they still have to use
the keyboard for text input, and maybe they'll learn some day that for a
form, keyboard-only use is normally best. But I digress.
Quote:
Since at least
one radio button in a group should be checked initially, |
Yes. Maybe I need to point to my document on choices in forms, since the
discussion has shown that this is not clear to all:
http://www.cs.tut.fi/~jkorpela/forms/choices.html Quote:
and I don't
want it to default to either, I am using a third option as the
default (checked). |
Fine, though sometimes it would make sense to have a fourth option as
well, so that you have two normal choices, the preselected choice
indicating that the question has not been answered yet, and a selectable
choice saying "Don't want to answer".
Quote:
Rather than have that third option say something
like "you must pick one of the other two", I am styling it as hidden
like this:
label style="visibility:hidden">Huh!<input name="Permission"
type="radio" value="Huh!" checked ></label
Does anyone see any unintended consequences to doing it this way? |
Well, it looks odd when CSS is off. To begin with, the text precedes the
button, against the de facto standard, and the text looks odd. Remember
the CSS Caveats.
But if you write the entry in a manner that makes sense when presented
to the user, e.g.
<div style="visibility:hidden"><label><input name="Permission"
type="radio" value="Huh!" checked >Not answered yet</label></div>
then I don't see any _big_ problems with it. But it would probably be
better without the CSS code for hiding it.
Quote:
I realize that once they check either one of the visible options they
can't get back to the default, but that's really what I want. |
What if they make a choice, then realize that they don't really
understand the question or definitely don't want to answer? They have
the option of not submitting the form at all. Do you want to give them
also the option of submitting it with some part intentionally left
unfilled, perhaps with some explanation given by them in a textarea?
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/