[ic] insert checkbox values into table from form

Ed LaFrance interchange-users@icdevgroup.org
Tue Jul 30 12:41:00 2002


At 10:38 PM 07/29/2002 -0400, you wrote:
>Ed LaFrance wrote:
> > At 06:16 PM 07/29/2002 -0400, you wrote:
> > >Hi all,
> > >
> > >Ok, I just abandoned the idea of a feedback log and
> > >took Dan's suggestion to just update a table.  I have it
> > >working!
> > >
> > >but, I have some checkbox values so that the customer
> > >can select *3* things.  they are all named "name=important"
> > >and the table is only getting the *first one* of the three.
> > >
> > >is there something special to be done to collect all 3
> > >into one table field?
> > >
> > >thanks,
> > >Aaron
> > >Hazenet.net
> >
> > Haven't followed this thread from the beginning, but you
> > might want to do a
> > filter=nulltospace before (or during) the write to the table.
> >
> > - Ed L.
> >
>
>this filter doesn't seem to correct it (if I did it right) you still
>only get one of the values.
>
>any other ideas out there?
>
>thanks,
>Aaron

It does work, so I guess there is something else amiss. Some ways you could 
use it are:

1. As a param of the value tag, i.e.: [value filter=nulltospace name=foo]

2. Enclosing. i.e." [filter nulltospace][value foo][/filter]

3. Via perl with an mv_check, in which case you could just use a regex, i.e.:

         <input type=submit name=mv_c value="Submit Form">

         [set Submit Form]
         [calc]
                 $Values->{foo} = $CGI->{foo} =~ s/\0+//g;
                 return;
         [/calc]
         [/set]

One of these should work for you.

- Ed L.

===============================================================
Increase profits from your Interchange store...
http://www.newmediaems.com/cgi-bin/nm/software_fus.html
===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================