Can anyone help me with this? I am returning a record form a
database into a flash form. I can return the details to the form no
problem but I am having a problem with the cfselect items which I
have in my form. I want them to display the correct item rather
than just the default but I don’t know the syntax to make
them selected using the value I return from the database.
So far I have
<cfselect id="hear_about_us" name="hear_about_us"
label="How did you hear about Chilli?" required="yes" message="How
did you hear about Chilli?" width="180"
selected="#hear_about_us#">
If I put it as an text field it returns the correct value so
I know its passing the right data its just that the select
doesn’t seem to work.
freakyAndFree • Participant, Dec 17, 2007Dec 17, 2007
Ah. Then the 'selected' attribute of the cfselect tag is
meaningless -- strip it out. I take it you're generating a number
of <option> tags, then? If that's the case, you'd do this:
Hi guys thanks for your help sorry I should have said that
this cfselect does not get the values from a query but I will try
that with my other cfselect that does. What do I need to do
different if the values are hard coded?
Ah. Then the 'selected' attribute of the cfselect tag is
meaningless -- strip it out. I take it you're generating a number
of <option> tags, then? If that's the case, you'd do this: