This small code block should show you the err of your ways�

<cfparam name="form.test" default="0">

The value is <cfoutput>#form.test#</cfoutput>

<form name="test" action="" method="post">

1 <input type="radio" name="test" value="1"<cfif form.test is "1">
checked</cfif>><br>

2 <input type="radio" name="test" value="2"<cfif form.test is "2">
checked</cfif>><br>

3 <input type="radio" name="test" value="3"<cfif form.test is "3">
checked</cfif>><br>

<input type="submit" name="submit">

</form>



In your case, all of your fields have the same value so if one is checked,
the last one will ALWAYS be it�

It runs down like this�



If 1 then checked

If 1 then checked

If 1 then checked

The last if is always going to be the one.

If you changed them to checkboxes just for the sake of seeing the results�
all of them should be checked with the code you have. But since they are
radios, the last one it checks will be the only one on.

   _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 12, 2004 4:11 PM
To: CF-Talk
Subject: Bad Radio Button

Alright, this is what I've got........

<input type="Radio" name="blnLgBnrActive" <cfif
getInspirationsPEBanner.blnLgBnrActive IS 1>  value="1" checked="Yes"
<cfelse> value="0" checked="No"</cfif>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to