| JeffJake 2004-03-01, 9:28 pm |
| I have 2 questions about a form I've created. (I'm kind of a newbie with forms)
Part of my form has a checkbox group of Vendors for the user to choose from.
They can pick any and all that apply. To avoid having errors when the user
chooses "none" of the checkboxes, I've included a hidden field in this group
called "noVendor".
(See code below)
Question # 1
-=-=-=-=-=-=-=-
How do I avoid having "noVendor" show up when a user actually chooses 1 or
more vendors?
Question # 2
-=-=-=-=-=-=-=-=-
In the email created by the form (CFMail), how do I insert spaces in between
each of the vendors when the user chooses more than 1 vendor? Right now the
email will display:
Vendors of Interest: = vendor01,vendor02,vendor03,noVendor
Form Code (CheckBox Group)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<input name="vendor" type="checkbox" id="vendor01" value="vendor01">
<input name="vendor" type="checkbox" id="vendor02" value="vendor02">
<input name="vendor" type="checkbox" id="vendor03" value="vendor03">
<input name="vendor" type="hidden" id="noVendor" value="noVendor" checked>
ColdFusion Form Processing Page
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<cfmail
to="email@domain.com"
from="email@domain.com"
subject="Request from domain.com">
Company Name = #form.nameCompany#
First Name = #form.nameFirst#
Last Name = #form.nameLast#
Email = #form.email#
Email Confirmed= #form.emailConfirm#
Phone = #form.phone#
Phone Extension= #form.extension#
Comments / Message = #form.message#
Vendors of Interest: = #form.vendor#
</cfmail>
Thanks for your help!
Jake O Mite
|