This is what I am using for this, hope I'm not far off, I did not see the
original post


<CFPARAM NAME="status" DEFAULT="status1">

<html>
<head>
 <title>Untitled</title>
</head>

<body>
<form name="test">
<CFIF isDefined("status")>
 <CFIF status EQ "status1">
  <CFSET status_value = "CHECKED">
 </CFIF>
</CFIF>
<CFOUTPUT>
Status 1<input type="radio" name="status" VALUE="status1"
#status_value#>&nbsp;
Status 2<input type="radio" name="status" VALUE="status2">
</CFOUTPUT>
</form>


</body>
</html>




----- Original Message -----
From: "Bryan Stevenson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 9:21 AM
Subject: Re: Radio Button


> Hey Steven,
>
> If the form will be posted and do some sort of server-side error checking
> (and re-shown with errors if any are found) then my method (back a few
> posts) is the one to go with.  This is because my method initializes the
var
> for the radio button which then passes it's new or unchanged value into
the
> error checking process (when form is posted).  If errors are found the
form
> can be re-displayed with the users input and a list of errors.  By using
the
> looping/iif/de method the radio buttons will always revert to the value in
> the database as opposed to the value selected by the user after the
initial
> display of the form.....
>
> my 2 cents ;-)
>
> Bryan Stevenson
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> p. 250.920.8830
> e. [EMAIL PROTECTED]
> ---------------------------------------------------------
> Allaire Alliance Partner
> www.allaire.com
>
> ----- Original Message -----
> From: "Steven Lancaster" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 13, 2001 9:02 AM
> Subject: RE: Radio Button
>
>
> > I looked it up (sorry). I tried to use the iif but I can't get it to
work.
> I
> > will send a snippet and you can see what I am trying to do.
> >
> >
> >   <cfloop query="check">
> >             <input type="radio" name="status" value="Not Assigned Yet"
> > #IIf(status is Not Assigned Yet, de("checked") ,de (""))#>
> >             <font face="Arial, Helvetica, sans-serif"
> color="#FF0000"><b>Not
> > Assigned
> >             Yet</b></font></td>
> >         </tr>
> >         <tr>
> >           <td>
> >             <input type="radio" name="status" value="Work in Progress"
> > #IIf(status is Work in Progress, de("checked") ,de (""))#>
> >             <b><font face="Arial, Helvetica, sans-serif">Work In
> > Progress</font></b></td>
> >         </tr>
> >         <tr>
> >           <td>
> >             <input type="radio" name="status" value="Completed or
Closed"
> > #IIf(status is Completed or Closed, de("checked") ,de (""))#>
> >             <font face="Arial, Helvetica, sans-serif"
> > color="#009900"><b>Completed
> >             / Closed</b></font></td>
> >         </tr>
> > </cfloop>
> >
> >  Steven Lancaster
> >  WebMaster
> >  Core Laboratories
> >  6316 Windfern
> >  Houston, TX 77040
> >  713-328-2532 (Office)
> >  713-328-2150 (Fax)
> >  832-259-3010 (Cell)
> >  mailto:[EMAIL PROTECTED]
> >
> >  http://www.corelab.com
> >
> >
> >
> > -----Original Message-----
> > From: Lee Fuller [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 11:03 AM
> > To: CF-Talk
> > Subject: RE: Radio Button
> >
> >
> > Delayed Evaluation.. It's a function.
> >
> > Lee
> >
> >
> > > -----Original Message-----
> > > From: Steven Lancaster [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 8:50 AM
> > > To: CF-Talk
> > > Subject: RE: Radio Button
> > >
> > >
> > > what does iif and de stand for? I understand what it is
> > > doing, I just don't understand the syntax.
> > >
> > >  Steven Lancaster
> > >  WebMaster
> > >  Core Laboratories
> > >  6316 Windfern
> > >  Houston, TX 77040
> > >  713-328-2532 (Office)
> > >  713-328-2150 (Fax)
> > >  832-259-3010 (Cell)
> > >  mailto:[EMAIL PROTECTED]
> > >
> > >  http://www.corelab.com
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 10:48 AM
> > > To: CF-Talk
> > > Subject: RE: Radio Button
> > >
> > >
> > > > Is there any way to take a value out of a database and see if it
> > > > matches a value on a radio button and if it does to check
> > > that radio
> > > > button? I have 3 radio buttons. I need to look at the
> > > values and see
> > > > if they match whichever
> > > > one matches I need to have that radio button checked. I
> > > know this probably
> > > > and idiotic question (sorry).
> > >
> > > CFIF or IIF()
> > >
> > > <cfloop query="myQuery">
> > > <input type="radio" name="myName" value="1"
> > > #iif(myField is 1,de("checked"),de(""))#> 1<br> </cfloop>
> > >
> > > You get the idea
> > >
> > > Philip Arnold
> > > Director
> > > Certified ColdFusion Developer
> > > ASP Multimedia Limited
> > > T: +44 (0)20 8680 1133
> > >
> > > "Websites for the real world"
> > >
> > > **********************************************************************
> > > This email and any files transmitted with it are confidential
> > > and intended solely for the use of the individual or entity
> > > to whom they are addressed. If you have received this email
> > > in error please notify the system manager.
> > > **********************************************************************
> > >
> > >
> > >
> > >
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to