Feb 28th, 2010, 7:09 AM
(Feb 24th, 2010, 9:35 PM)Ben Wrote:(Feb 23rd, 2010, 3:41 PM)martin_undefined Wrote: So if I understand you correctly, I need to:
1) Call my form and pass the id in eg. myform.php?form_id=5
Yup!
(Feb 23rd, 2010, 3:41 PM)martin_undefined Wrote: 2) Once the session has been started, store the form_id in the session
Yes. The Form Tools API functions will handle this for you - as long as you pass in the $_GET["form_id"] to the ft_api_init_form_page function.
Hope that makes sense!
- Ben
Hi Ben,
It makes perfect sense, but I seem to falling at the first hurdle. I've attempted various permutations of using $_GET to pass in the form id. However, I seem to keep running into the same problem, namely that when the form is submitted, I get error messages like this:
Quote:Notice: Undefined index: form_id in /home/sites/mysite.com/public_html/forms/myform1.php on line 6
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sites/mysite.com/public_html/forms/wcpro1.php:6) in /home/sites/mysite.com/public_html/formtools2/global/api/api.php on line 1555
Warning: Cannot modify header information - headers already sent by (output started at /home/sites/mysite.com/public_html/forms/wcpro1.php:6) in /home/sites/mysite.com/public_html/formtools2/global/api/api.php on line 1556
Warning: Cannot modify header information - headers already sent by (output started at /home/sites/mysite.com/public_html/forms/wcpro1.php:6) in /home/sites/mysite.com/public_html/formtools2/global/api/api.php on line 1557
Warning: Cannot modify header information - headers already sent by (output started at /home/sites/mysite.com/public_html/forms/wcpro1.php:6) in /home/sites/mysite.com/public_html/formtools2/global/api/api.php on line 861
I've tried using $_GET both to assign the value to $form_id before using the ft_api expression and also directly in the expression (although not sure I can do that!).
Given that the page loads okay when called by myform.php?form_index=5, it almost seems like the page is being reloaded without the query string - therefore causing this error. Could validation be causing this?
On a seperate note, I notice when putting through test submissions (without trying the multi-form paypal code) my success.php displays
First Name: Test
Last Name: User
i.e. not the values being submitted in the form. Is this what Paypal's sandbox normally bounces back or is it another problem on my side?
Thank you!
Martin