Gossamer Forum
Home : Products : DBMan : Customization :

Keeping radio button and selection together; display problem

Quote Reply
Keeping radio button and selection together; display problem
If this problem has been posted in the archives before, I can't find it...

I have several fields for which I'm using radio buttons where I have a fairly large number of choices. The problem I am having is getting the radio button to stay with its choice. I have tried breaking in certain places using <br> and using &nbsp; between the button and choice, but those solutions seem to want to make the <br> or &nbsp; part of the name of the choice, ie, "Bluebonnet Regional" might become "Bluebonnet Regional<br>."

Ideally, I would like to be able to decide how many choices to put on each line and set line breaks in the appropriate places *and* insure that the radio buttons and choices are not separated.

My files are in the following locations:

http://www.ebr.lib.la.us/html_pl.txt

http://www.ebr.lib.la.us/db_cgi.txt

http://www.ebr.lib.la.us/default_cfg.txt .

Thanks,

Elizabeth
Quote Reply
Re: [ebm76] Keeping radio button and selection together; display problem In reply to
You'll probably have to quit using &build_radio and "hard code" your radio buttons using the following format. This way you can use breaks, (or not) and treat them like any other html tag.

Example:
Code:
<INPUT TYPE="radio" NAME="Type" VALUE="Big"|; if ($rec{'Type'} eq "Big") {print " SELECTED";} print qq|> Big
<INPUT TYPE="radio" NAME="Type" VALUE="Medium"|; if ($rec{'Type'} eq "Medium") {print " SELECTED";} print qq|> Medium
<INPUT TYPE="radio" NAME="Type" VALUE="Little"|; if ($rec{'Type'} eq "Little") {print " SELECTED";} print qq|> Little

Will give you: 0Big 0Medium 0Little
Quote Reply
Re: [Watts] Keeping radio button and selection together; display problem In reply to
Thanks Watts!

This solution worked perfectly! Seems so obvious now that you say it :)

Elizabeth