OccasionalCoder
Technical User
Here's the code I use to select the checked radio box when I pull the form info from a simple database:
<cfif get_data.status eq "current">
Current: <input type="radio" name="status" value="current" checked>
Past: <input type="radio" name="status" value="past">
<cfelse><br>
Current: <input type="radio" name="status" value="current">
Past: <input type="radio" name="status" value="past" checked>
</cfif>
When my query returns only 1 record, the radio box works correctly.
In an instance where there were 4 records returned, the radio boxes are empty for the first 3 and the last one is correct.
I don't understand why this doesn't work when there are multiple records returned.
Thanks for all help
<cfif get_data.status eq "current">
Current: <input type="radio" name="status" value="current" checked>
Past: <input type="radio" name="status" value="past">
<cfelse><br>
Current: <input type="radio" name="status" value="current">
Past: <input type="radio" name="status" value="past" checked>
</cfif>
When my query returns only 1 record, the radio box works correctly.
In an instance where there were 4 records returned, the radio boxes are empty for the first 3 and the last one is correct.
I don't understand why this doesn't work when there are multiple records returned.
Thanks for all help