YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

prepopulate shipping and name fields Options
jpwebdesigner
#1 Posted : Wednesday, March 09, 2005 4:54:00 PM
Rank: Starting Member

Groups: Registered

Joined: 3/2/2005
Posts: 13
Location: ,
i need to prepopulate name/address/email/phone fields, all the while using a special cgi script so that donations can be chosen from a drop down list AND entered in manually. i have the latter part worked out, but i can't get the prepopulated fields to work. here is the url: http://partners-charity..../donate_new_address.html the cgi script i am using is: #! /usr/bin/perl sub GetFormData { if ($ENV{'REQUEST_METHOD'} eq 'GET') { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); if ($ENV{'QUERY_STRING'}) { @getpairs = split(/&/,$ENV{'QUERY_STRING'}); push (@pairs, @getpairs);} } foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $value =~ tr/+/ /; $name =~ s/%(..)/pack("C", hex($1))/eg; $value =~ s/%(..)/pack ("C", hex($1))/eg; $value =~ s/<!--(.|\n)*-->//g; if ($in{$name}){$in{$name}.=", $value";} else{$in{$name} = $value;} } } {&GetFormData} if ($in{'amount'} eq "texta") { $in{'amount'} = $in{'texta'}; } if ($in{'amount'} eq "dropa") { $in{'amount'} = $in{'dropa'}; } $browser = "https://www.paypal.com/xclick/business=mgrimes\@worcesterdiocese.org&item_name=$in{'item_name'}&item_number=$in{'item_name'}=&on0=$in{'on0'}&os0=$in{'os0'}&amount=$in{'amount'}&no_shipping=0&no_note=1¤cy_code=USD"; print "Location: $browser\n\n";
Sponsor  
 
Andrew Chang
#2 Posted : Wednesday, March 09, 2005 6:00:32 PM
Rank: Starting Member

Groups: Registered

Joined: 1/10/2003
Posts: 738
Location: ,
The suggested character limit of a url is 200 characters.
The limit on characters is 2024 but I do not know if paypaly servers will handle this. You may want to try a js soloution which will change values in the form and then submit as a post instead. If you would like to test paypals servers you can add the Pre Pop variables to the URL the same way you added the others the "&" signifies the new field
EXAMPLE
&first_name=$in{'first_name'}


Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate
Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
jpwebdesigner
#3 Posted : Thursday, March 10, 2005 1:57:36 PM
Rank: Starting Member

Groups: Registered

Joined: 3/2/2005
Posts: 13
Location: ,
thanks for all of your help. that worked!

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Andrew Chang
[br]The suggested character limit of a url is 200 characters.
The limit on characters is 2024 but I do not know if paypaly servers will handle this. You may want to try a js soloution which will change values in the form and then submit as a post instead. If you would like to test paypals servers you can add the Pre Pop variables to the URL the same way you added the others the "&" signifies the new field
EXAMPLE
&first_name=$in{'first_name'}


Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate
Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.127 seconds.