[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Using checkboxes to write multiple values to one field
****** message to minivend-users from Ed LaFrance <edlafrance@printexusa.com> ******
Joachim -
According to the HTML specification for the checkbox form element, it is
intended to allow the passing of multiple values to the same form variable:
<b>What would you like on your hotdog?:<b><p>
<input type=checkbox name=condiments value="mustard">
<input type=checkbox name=condiments value="ketchup">
<input type=checkbox name=condiments value="relish">
<input type=checkbox name=condiments value="sauerkraut">
<input type=checkbox name=condiments value="onions">
...returns (not exactly in this format):
condiments="mustard ketchup relish sauerkraut onions"
...if the user checks all boxes. This is completely legal HTML. As it
turns out, with the help of Bill Randle I learned that Minivend does
comply, but it puts a null character at the end of each checkbox choice
which is returned, so I have to remove it to get the space-delimited list I
am trying to allow the user to build.
- Ed L.
At 10:56 AM 4/4/00 +0200, you wrote:
>****** message to minivend-users from jojo@buchonline.net ******
>
>On 3 Apr, Ed LaFrance wrote:
> > ****** message to minivend-users from Ed LaFrance
> <edlafrance@printexusa.com> ******
> >
> > Bill -
> >
> > Would you mind sharing a little of the code from the page where you use
> > checkboxes?
> >
> > I tried removing the trailing spaces from my fields and I am still getting
> > only the first checked option in the database. Note that I have verified
> > this by exporting the database and looking at its contents, and by
> checking
> > for values in the field using [if value] logic.
> >
> > Also note that if I do this
> >
> > <input type=checkbox name=myfield value="A B"> Option A B
> > <input type=checkbox name=myfield value="C "> Option C
> > <input type=checkbox name=myfield value="D "> Option D
> >
> > Minivend saves and retrieves "A B" repeatedly without problems. I can
> also
> > change the form element to a text field and type in as many
> space-separated
> > items as I want, and they are saved and retrieved without
> trouble. Maybe I
> > am misunderstanding this, but I don't think the spaces are the source
> of my
> > trouble.
> >
> > - Ed L.
>
>Ed,
>
>iīm not sure about this thread. But it seems to me, passing any values
>via the post methode with your codes like above should cause some
>trouble. It seems to me, you canīt use the _same_ variable name to pass
>more than one value. What did you get, if you use the different
>variable names like "myfield1", "myfield2" and so on?
>
>Iīm in a muddle. With my understanding of the post methode, i canīt
>believe, your codes like above with _one_ name for _all_ those different
>values will works well. Is this a right usage to pass a lot of values
>with a lot of input tags with the same _one_ name?
>
>Regards,
>
> Joachim
>
>--
>Hans-Joachim Leidinger
>buch online jojo@buchonline.net
>Munscheidstr. 14 FAX: +49 209 1971449
>45886 Gelsenkirchen FAX: 0209 1671449
>
>-
>To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
>email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
>Archive of past messages: http://www.minivend.com/minivend/minivend-list
Printex Marking Technologies
12113 Kirkham Rd.
Poway, CA 92064 U.S.A.
858-513-2418
800-982-1928
858-513-2419 FAX
http://www.printexusa.com
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list