[ic] Hidden fields mapping

Ed LaFrance interchange-users@lists.akopia.com
Thu May 31 19:29:00 2001


At 07:00 PM 05/31/2001 -0400, you wrote:
>Ed,
>
>I dont understand how the following code affect the URL request?!

Sorry, I didn't really understand your question - I just saw 'map one value 
to another name while submitting the form', I didn't know you were looking 
for the actual code to send the values in the bargain.

It sounds like you have a bit more on your hands than just a line or two of 
code; do you have any code for the form post?  What happens during and 
after the post, is the browser redirected.  Do you have to coordinate with 
the order submission?  Is anything predicated on a return value?  These are 
some of the things you have to consider. There are several ways you could 
do it; the best will be determined by your specific needs.




>You are telling me that when the person will submit the form, the mv_check
>will execute this code. I follow you there I've worked a bit with mv_check
>but that the return value of this code is actually the URL is out of my
>understanding...I think the variables that will be created will be session
>vars wouldnt they? I need em to be hidden posts.
>
>Besides, it doesnt seem to work. Is there any way i could see if the values
>have been modified?
>
>Here's what i tried:
>
>[set map_fields]
>[perl]
>          my $out;
>          $out = "name=$CGI->{fname}%40$CGI->{lname}\n";
>          $out .= "address=$CGI->{address1}\n";
>          return $out;
>[/perl]
>[/set]
>
>and by setting the hidden mv_check to map_fields of course.
>
>J.P.
>
>----- Original Message -----
>From: "Ed LaFrance" <edl@newmediaems.com>
>To: <interchange-users@developer.akopia.com>
>Sent: Thursday, May 31, 2001 4:58 PM
>Subject: Re: [ic] Hidden fields mapping
>
>
> > At 02:10 PM 05/31/2001 -0400, you wrote:
> > >Hiya folks
> > >
> > >I've been  trying to map the checkout hidden fields to some other name
>when
> > >submitting a form.
> > >Is there any way to do that as i think the value isn't known yet and
>can't
> > >be assigned via variables yet.
> > >
> > >I tried to use the mv_check and then assign the value of the form to a
> > >session var but the payment host cannot access the session vars...it
>needs
> > >hidden fields sent by a POST.
> > >
> > >I'd rather avoid the javascript...
> > >
> > >Thank you
> > >
> > >J.P. Parent
> >
> > One way would go something like this:
> >
> > <form action=....>
> > <input type=hidden name=value1 value="something">
> > <input type=hidden name=value2 value="something2">
> > ...
> > <input type hidden name=mv_check value=map_fields>
> >
> > </form>
> >
> > [set map_fields]
> > [perl]
> >          my $out;
> >          $out = "map_value1=$CGI->{value1}\n";
> >          $out .= "map_value2=$CGI->{value2}\n";
> >          return $out;
> > [/perl]
> > [/set]
> >
> > When you submit the form, the CGI data structure will be updated, then
> > map_fields will be executed.  The Perl just outputs assignments of the raw
> > values of value1 and value2 to your 'map' variables.  There are no doubt
> > many other perfectly good ways to do this...
> >
> > - Ed L.
> >
> >
> > >_______________________________________________
> > >Interchange-users mailing list
> > >Interchange-users@lists.akopia.com
> > >http://lists.akopia.com/mailman/listinfo/interchange-users
> >
> > ===============================================================
> > 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
> > ===============================================================
> >
> > _______________________________________________
> > Interchange-users mailing list
> > Interchange-users@lists.akopia.com
> > http://lists.akopia.com/mailman/listinfo/interchange-users
>
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users

===============================================================
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
===============================================================