The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.25 (Linux)
|
![]() |
Multiple PayPal Forms in same location - how? - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Multiple PayPal Forms in same location - how? (/showthread.php?tid=525) Pages:
1
2
|
RE: Multiple PayPal Forms in same location - how? - Ben - Mar 11th, 2010 Hey guys, Sorry for the wait! To recap: Quote:I really don't want form_id added to any front-end links if at all possible, couldn't I just store in in a php variable in the form code?Agreed! It would be nice to avoid. Quote:By reading this am I correct that I'd have to link to the forms themselves with the ?form_id= appended or could I just send the formid from the form to the paypal processing page? The simplest way is to pass the form ID via the query string, but there are other options - a couple of which I'll explain below. You can't just send the form ID to the PayPal processing page because it's needed at the very start. The moment the user first arrives on the form page, the API function (ft_api_init_form_page()) does some work behind the scenes to store space in sessions for this particular session. It requires the form ID to work - that's basically the long and short of it. So the problem is, since it needs to know right off the bat what the form ID is that we're interested in we have to tell it somehow. Passing it via the query string is a quick and easy solution to get around it. But here's a couple of other options: 1. POST the form ID to the page instead of passing it via the query string. Whenever you link to the page, put the form_id in a form post, probably a hidden field. This obviously isn't great. But at least the query string would be empty. 2. Instead of passing the form ID, pass in a descriptive string instead, e.g. form.php?page=ApplicationForm form.php?page=RegistrationForm form.php?page=MyContactForm (or whatever). Then, in the PHP at the very top of your page, map those strings to a form ID, like this: PHP Code: $map = array( ($request is a variable mentioned by Martin in a previous post. It's a the $_POST and $_GET hashes squished together). And that's pretty much it. Any help at all...? - Ben |