Processing multiselect boxes or multiple checkboxes with the same name

Jason Pitt <[email protected]> Tue, 19 Jul 2016 15:56:35 -0700
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <CANcfARMrf56xFE4rHfWNZHpuEzAfEFjtpTQzLM6-7QBLA0QBjA@mail.gmail.com>
--===============1721146180436763960==
Content-Type: multipart/alternative; boundary=001a1142595a295e77053804ffad

--001a1142595a295e77053804ffad
Content-Type: text/plain; charset=UTF-8

Hi-

It would be infinitely easier for the cgi interface that I'm writing with
cgicc if I were able to have an html form that had a group of elements like:

<h1>Pizza topings:</h1>

<SELECT NAME="toppings" *MULTIPLE* SIZE=5>
<OPTION VALUE="mushrooms">mushrooms
<OPTION VALUE="greenpeppers">green peppers
<OPTION VALUE="onions">onions
<OPTION VALUE="tomatoes">tomatoes
<OPTION VALUE="olives">olives
</SELECT>

or alternatively a group of checkboxes that all had the same name but
returned different values in an array, like this:

<input type="checkbox" name="remove[]" value="mushrooms">
<input type="checkbox" name="remove[]" value="green peppers">
<input type="checkbox" name="remove[]" value="onions">
<input type="checkbox" name="remove[]" value="tomatoes">
<input type="checkbox" name="remove[]" value="olives">

I can't seem to get cgicc to handle forms like this.
Any help would be appreciated.  The reason I'd like this approach
is because unlike my pizza example the form elements I'm dealing with
won't be static and
will be changing all the time and I'd rather not have to write a bunch
of convoluted
 code to reference the changing values by name from the form.

-Thanks

Jason








-- 
/*
Jason Pitt PhD                                   206.616.1193
Kaeberlein Lab                                   [email protected]
University of Washington
Department of Pathology
Health Sciences Building                    Box 357470
1989 NE Pacific Street
Seattle, WA 98195
*/

--001a1142595a295e77053804ffad
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>Hi-<br><br></div>It would be infinitely easier f=
or the cgi interface that I&#39;m writing with cgicc if I were able to have=
 an html form that had a group of elements like:<br><br></div><div>&lt;h1&g=
t;Pizza topings:&lt;/h1&gt;<br><pre>&lt;SELECT NAME=3D&quot;toppings&quot; =
<em class=3D"examplecode">MULTIPLE</em> SIZE=3D5&gt;
&lt;OPTION VALUE=3D&quot;mushrooms&quot;&gt;mushrooms
&lt;OPTION VALUE=3D&quot;greenpeppers&quot;&gt;green peppers
&lt;OPTION VALUE=3D&quot;onions&quot;&gt;onions
&lt;OPTION VALUE=3D&quot;tomatoes&quot;&gt;tomatoes
&lt;OPTION VALUE=3D&quot;olives&quot;&gt;olives
&lt;/SELECT&gt;<br><br></pre><pre><span style=3D"font-family:arial,helvetic=
a,sans-serif">or alternatively a group of checkboxes that all had the same =
name but <br>returned different values in an array, like this:<br></span><b=
r></pre><pre>&lt;input type=3D&quot;checkbox&quot; name=3D&quot;remove[]&qu=
ot; value=3D&quot;mushrooms&quot;&gt;<br>&lt;input type=3D&quot;checkbox&qu=
ot; name=3D&quot;remove[]&quot; value=3D&quot;green peppers&quot;&gt;<br>&l=
t;input type=3D&quot;checkbox&quot; name=3D&quot;remove[]&quot; value=3D&qu=
ot;onions&quot;&gt;<br>&lt;input type=3D&quot;checkbox&quot; name=3D&quot;r=
emove[]&quot; value=3D&quot;tomatoes&quot;&gt;<br>&lt;input type=3D&quot;ch=
eckbox&quot; name=3D&quot;remove[]&quot; value=3D&quot;olives&quot;&gt;<br>=
<br></pre><pre><span style=3D"font-family:arial,helvetica,sans-serif">I can=
&#39;t seem to get cgicc to handle forms like this.  <br>Any help would be =
appreciated.  The reason I&#39;d like this approach <br>is because unlike m=
y pizza example the form elements I&#39;m dealing with won&#39;t be static =
and<br>will be changing all the time and I&#39;d rather not have to write a=
 bunch of convoluted<br>=C2=A0code to reference the changing values by name=
 from the form.<br></span><br></pre><pre>-Thanks<br></pre><pre>Jason<br></p=
re><pre><br><br>=C2=A0<br></pre><br></div><div><br clear=3D"all"><div><div>=
<br>-- <br><div class=3D"gmail_signature" data-smartmail=3D"gmail_signature=
"><div dir=3D"ltr">/*<br>Jason Pitt PhD =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 206.616.1193<br>Kaeberlein Lab =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 <span><span><a href=3D"mailto:[email protected]" target=3D"_blank=
">[email protected]</a></span></span><br>University of Washington<br>Department=
 of Pathology<br>Health Sciences Building=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 Box 357470<br>1989 NE Pacific Street<br>Seattle, WA 98195<br>*/</div=
></div>
</div></div></div></div>

--001a1142595a295e77053804ffad--


--===============1721146180436763960==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
help-cgicc mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-cgicc

--===============1721146180436763960==--