Good afternoon,
I have data on my company's job openings in an SQL database. One field, Closed, has a datatype of bit. A value of 1 indicates that the job has been filled and is closed, while a value of 0 indicates that the job is still open.
I am creating an administration form for our HR department to maintain this data online. I am using a query to pull the information on all the jobs in the table into a form. Actually, one query populates a drop down list of all jobs and the selection of one of the jobs populates the rest of the form. I want to use the values of Closed to check one of two option buttons on the form:
<cfinput type="radio" name="Closed" value="Open">Open
<cfinput type="Radio" name="Closed" value="Closed">Closed
The value of the field Closed is contained in a variable named dspClosed. Do I use a <cfif> tag?
I tried:
<cfinput type="radio" name="Closed" value="Open" <cfif dspclosed=="0">checked</cfif>>Open
<cfinput type="Radio" name="Closed" value="Closed" <cfif dspclosed=="1">checked</cfif>>Closed
But CF doesn't like the cfif withing the cfinput tag.
My problem is that I don't know to modify the option/radio button statements above to show the correct value. Currently, they don't show anything.
Any help, ideas, war stories, reference would be greatly appreciated.
Kathryn
I have data on my company's job openings in an SQL database. One field, Closed, has a datatype of bit. A value of 1 indicates that the job has been filled and is closed, while a value of 0 indicates that the job is still open.
I am creating an administration form for our HR department to maintain this data online. I am using a query to pull the information on all the jobs in the table into a form. Actually, one query populates a drop down list of all jobs and the selection of one of the jobs populates the rest of the form. I want to use the values of Closed to check one of two option buttons on the form:
<cfinput type="radio" name="Closed" value="Open">Open
<cfinput type="Radio" name="Closed" value="Closed">Closed
The value of the field Closed is contained in a variable named dspClosed. Do I use a <cfif> tag?
I tried:
<cfinput type="radio" name="Closed" value="Open" <cfif dspclosed=="0">checked</cfif>>Open
<cfinput type="Radio" name="Closed" value="Closed" <cfif dspclosed=="1">checked</cfif>>Closed
But CF doesn't like the cfif withing the cfinput tag.
My problem is that I don't know to modify the option/radio button statements above to show the correct value. Currently, they don't show anything.
Any help, ideas, war stories, reference would be greatly appreciated.
Kathryn