[ic] Hidden fields mapping

Ed LaFrance interchange-users@lists.akopia.com
Thu May 31 16:56:01 2001


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