checkbox vs text box

S

shank

I posted this in an HTML forum, but I think it's going to take some
scripting to act as I want to act.

I have a form with multiple records.
My intention is to have the user click a checkbox for each product he wants.
Then submit the form placing multiple items in his cart.
If I use a text box like the following and enter a 1 for each product,
submit, no problem.
The user gets the products he wants.
<input name="qty" type="text" value="0">

However, if I use the following checkbox code, and assuming the user checks
4 products half way down the page, he will get the first 4 products in the
recordset. If he clicks 1 checkbox, he will always get the first product,
not the product he chose.
<input name="qty" type="checkbox" value="1">

What I have found is when I submit the form to a blank test page using
checkoxes or text boxes, there's a considerable difference. The text boxes
deliver a comma delimination for each occurance. The checkboxes only offer
comma delimination for each checkbox that is selected. At this point, I'm
assuming that's the difference between the two and it cannot be changed
through HTML.

How can I make the checkboxes act as text boxes?

thanks
 
A

anthonybrough

Hi Shank

Not sure if I am on the right track here, but are you using a different
name for each of the checkboxes? and how are they generated, from a
database or hard coded. Can we see the relevant part of your code.

Cheers

Tony
 
B

Bob Lehmann

I'm not sure I follow you, but checkboxes aren't posted unless they're
checked.

And you can't change that.

Bob Lehmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top