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'm writing with cgicc if I were able to have= an html form that had a group of elements like:<br><br></div><div><h1&g= t;Pizza topings:</h1><br><pre><SELECT NAME=3D"toppings" = <em class=3D"examplecode">MULTIPLE</em> SIZE=3D5> <OPTION VALUE=3D"mushrooms">mushrooms <OPTION VALUE=3D"greenpeppers">green peppers <OPTION VALUE=3D"onions">onions <OPTION VALUE=3D"tomatoes">tomatoes <OPTION VALUE=3D"olives">olives </SELECT><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><input type=3D"checkbox" name=3D"remove[]&qu= ot; value=3D"mushrooms"><br><input type=3D"checkbox&qu= ot; name=3D"remove[]" value=3D"green peppers"><br>&l= t;input type=3D"checkbox" name=3D"remove[]" value=3D&qu= ot;onions"><br><input type=3D"checkbox" name=3D"r= emove[]" value=3D"tomatoes"><br><input type=3D"ch= eckbox" name=3D"remove[]" value=3D"olives"><br>= <br></pre><pre><span style=3D"font-family:arial,helvetica,sans-serif">I can= 't seem to get cgicc to handle forms like this. <br>Any help would be = appreciated. The reason I'd like this approach <br>is because unlike m= y pizza example the form elements I'm dealing with won't be static = and<br>will be changing all the time and I'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==--