Question
cfif select option value problem
I have a form with a dropdown box asking users to select
where they
heard about my site. The completed form sent to me via email.
The dropdown is optional so if they don't select it I would like nothing
to be returned in the email.
The first option reads "I heard about you from" - I've tried <option
value> <option value=""> and even <cfselect> with various options but I
can't get it to work.
This is what I have for the email:
<cfif isdefined("form.referral")><cfoutput>#form.senderFirst# heard
about you from #form.referral#</cfoutput></cfif>
This is what I have for the select options:
<select name="referral">
<option value="">I heard about you from...</option>
<option value="Google">Google</option>
<option value="Yahoo!">Yahoo!</option>
<option value="Ask">Ask</option>
<option value="MSN">MSN</option>
<option value="a friend">A friend</option>
<option value="somewhere else">Somewhere else</option>
</select>
heard about my site. The completed form sent to me via email.
The dropdown is optional so if they don't select it I would like nothing
to be returned in the email.
The first option reads "I heard about you from" - I've tried <option
value> <option value=""> and even <cfselect> with various options but I
can't get it to work.
This is what I have for the email:
<cfif isdefined("form.referral")><cfoutput>#form.senderFirst# heard
about you from #form.referral#</cfoutput></cfif>
This is what I have for the select options:
<select name="referral">
<option value="">I heard about you from...</option>
<option value="Google">Google</option>
<option value="Yahoo!">Yahoo!</option>
<option value="Ask">Ask</option>
<option value="MSN">MSN</option>
<option value="a friend">A friend</option>
<option value="somewhere else">Somewhere else</option>
</select>
