[WEB4LIB] Radio buttons on forms

Norwood, Randy randy.norwood at ttu.edu
Thu Sep 2 13:56:55 EDT 2004


Actually, it is possible to have a set of radio buttons with none
selected.

I've done this type of validation in javascript, and PHP and Perl on the
server side. Javascript is preferable, IMO. It's been a while since web
developers have had to be concerned about users not having adequate
Javascript support--especially for something like form validation.

There's a very good cookbook-style introductory book, JavaScript in 10
Steps or Less, by Arman Danesh. I use it as a reference, and it's also
good for learning how to do most of the basic tasks in Javascript,
including what you're trying to do..

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Randy Norwood
Web Manager
Texas Tech University Libraries
Office: 806-742-2238 x318
Fax: 806-742-8669
E-mail: randy.norwood at ttu.edu


-----Original Message-----
From: web4lib at webjunction.org
[mailto:web4lib at webjunction.org] On Behalf Of Paula Edmiston
Sent: Thursday, September 02, 2004 11:07 AM
To: Multiple recipients of list
Subject: [WEB4LIB] Radio buttons on forms

I just discovered that it's not possible to have an unselected radio
button. I'm working with a free perl script to process a form. The
script checks to see if any question was unanswered and if so, following
the submission, it directs the user to return to the form and answer
that question.

How to make sure every question is answered? Due to the nature of the
survey I can't substitute check boxes or text input. I need those radio
buttons.

Perhaps always an option "UNanswered" so that when processing the form a
query can be applied that is the value is UNanswered, return to answer
that question. (I don't know perl so I can't really adapt the script to
say "if the value is "UNanswered" return to complete the form). I think
I could try it in php, I am just now learning that language (has anyone
done this that would be willing to help me?).

Has anyone here run up against that problem without coding around it in
a language like php or perl? I would rather NOT use javascript as I
don't want to be dependent on the user having js turned on.

Any assistance or comments will be greatly appreciated.

best,
paula

----
Paula Edmiston
paula at edmiston.org
---------------------------------
Natives who beat drums to drive off evil spirits are objects of scorn to
smart Americans who blow horns to break up traffic jams. - Kelly













More information about the Web4lib mailing list