Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Check Boxes 1

Status
Not open for further replies.

monoone

Programmer
Joined
May 24, 2002
Messages
219
Location
US
I am trying to input data "Yes" or "No" value in 3 check boxes:

-------See code----------------

With this form I request the following (please check the pack(s) you would like):
<BR>
<INPUT TYPE=&quot;checkbox&quot; NAME=&quot;MakPac&quot; ID=&quot;MakPac&quot; VALUE=&quot;Yes&quot;>&nbsp;&nbsp;Macintosh XP Blade Demo Pack - Consisting of MAC 3 & 4.
<BR>
<INPUT TYPE=&quot;checkbox&quot; NAME=&quot;MilPak&quot; ID=&quot;MilPak&quot; VALUE=&quot;Yes&quot;>&nbsp;&nbsp;Miller XP Blade Demo Pack - Consisting of Miller 2 & 3.
<BR>
<INPUT TYPE=&quot;checkbox&quot; NAME=&quot;PedPak&quot; ID=&quot;PedPak&quot; VALUE=&quot;Yes&quot;>&nbsp;&nbsp;XP Pediatric Blade Demo Pack - Consisting of Miller 0 and 1
&nbsp;
</TD>


------------------------------------------------

This will not work. What am I doing wrong?

My Access DB had 3 fields:

MilPak
MaxPac
PedPak

Any help would be great,

Thanks,

Eric
 
unchecked checkboxes are not passed to the action page...

you need to <cfparam> your checkbox formfields and do something like

<cfparam name=&quot;form.MakPac&quot; default=&quot;No&quot;>
<cfparam name=&quot;form.MilPac&quot; default=&quot;No&quot;>
<cfparam name=&quot;form.PedPak&quot; default=&quot;No&quot;>

<cfquery>
update tablename
set MakPac = '#form.MakPac#',
set MilPac = '#form.MilPac#',
set PedPak = '#form.PedPak#'
where
your conditional clause......
</cfquery>



------------------------------------------------------------------------------
brannonH
if( !succeed ) try( );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top