Am I the onlyone that thinks that check boxes are the most tediuos things to 
work with?

I'm working on a contact form in which asks th client to check the options they 
want to know more about such as:

Links
Banners
ETC

When the form has CHECK checkboxes it works, but it doesn't work with unchecked 
checkboxes. I used the following code to try and fix it (I saw it on a website) 
but it didn't either.

    <CFPARAM Name="Dh" Default=0>
                <CFIF val(Dh)>
          <CFSET Dh = 1>
        <CFELSE>
          <CFSET Dh = 0>
        </CFIF>
    <CFPARAM Name="Wh" Default=0>
                <CFIF val(Wh)>
          <CFSET Wh = 1>
        <CFELSE>
          <CFSET Wh = 0>
        </CFIF>
    <CFPARAM Name="BWh" Default=0>
                <CFIF val(BWh)>
          <CFSET BWh = 1>
        <CFELSE>
          <CFSET BWh = 0>
        </CFIF>


HERE IT's WHAT I'VE GOT:

/////////////////FORM\\\\\\\\\\\\\\\\\\\
  <cfinput type="checkbox" name="Dh" id="Dh">
Daily Hunts<br />
  <cfinput type="checkbox" name="Wh" id="Wh">
Weekly Hunts<br />
  <cfinput type="checkbox" name="Bwh" id="Bwh"> 
Bi-Weekly Hunts<br />
  <cfinput type="checkbox" name="Mh" id="Mh">
Monthly Hunts<br />
  <cfinput type="checkbox" name="Banners" id="Banners"> 
Banners<br />
  <cfinput type="checkbox" name="Links" id="Links"> 
Links<br />
Other: 
  <cfinput type="text" name="Other" id="Fname11">



//////////////////AFTER SUBMIT//////////////

<cfif isDefined ("form.Fname")>

    <CFPARAM Name="Dh" Default=0>
                <CFIF val(Dh)>
          <CFSET Dh = 1>
        <CFELSE>
          <CFSET Dh = 0>
        </CFIF>
    <CFPARAM Name="Wh" Default=0>
                <CFIF val(Wh)>
          <CFSET Wh = 1>
        <CFELSE>
          <CFSET Wh = 0>
        </CFIF>
    <CFPARAM Name="BWh" Default=0>
                <CFIF val(BWh)>
          <CFSET BWh = 1>
        <CFELSE>
          <CFSET BWh = 0>
        </CFIF>
    <CFPARAM Name="Mh" Default=0>
                <CFIF val(Mh)>
          <CFSET Mh = 1>
        <CFELSE>
          <CFSET Mh = 0>
        </CFIF>
    <CFPARAM Name="Banners" Default=0>
                <CFIF val(Banners)>
          <CFSET Banners = 1>
        <CFELSE>
          <CFSET Banners = 0>
        </CFIF>
    <CFPARAM Name="Links" Default=0>
                <CFIF val(Links)>
          <CFSET Links = 1>
        <CFELSE>
          <CFSET Links = 0>
        </CFIF>

        <table width="75%" border="0" align="center" cellpadding="2" 
cellspacing="2">
          <tr>
            <td><p align="center"><strong>your Information has been 
submited!</strong></p>
              <p align="center">We will contact you as soon as we can.<br />
              Thank you.</p>
              <p align="center"><strong>UBERhunt.com</strong></p></td>
      
       <cfmail to = "[EMAIL PROTECTED]"
         from = "[EMAIL PROTECTED]"
         subject = "Advertiser Request Application" 
server="smtpmailer.hostek.net">
         <cfoutput >                          


 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
= =                      ADVERTISER REQUEST
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
= = 

                    First Name:                 #form.Fname#
                    Last Name:                  #form.Lname#
                    Company:                    #form.Company#
                    Website:                    #form.URL#
                    Email:                              #form.EmailAdd#
                    Phone:                              #form.Phone#
                    City:                               #form.City#
                    State:                              #form.State#
                    Industry:                   #form.Industry#

                    Brief Company
                    Description:
                    #form.CompDesc#



                    How did you hear about us?
                    #form.HowWeMet#
                    
                    What are you interested on?
                                        
                    Daily Hunts                 #form.Dh#
                    Weekly Hunts                #form.Wh#
                    Bi-Weekly Hunts             #form.Bwh#
                    Monthly Hunts               #form.Mh#
                    Banners                     #form.Banners#
                    Links                       #form.Links#
                    Other                       #form.Other#

                    
                    
////////////////////////////////////////////////////////////////////////////////////
                                AUTO MAILER UBERHUNT.com
////////////////////////////////////////////////////////////////////////////////////
                    
        </cfoutput>
  </cfmail>   

<cfelse>

FORM APPEARS AGAIN

</cfif> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3471
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to