Hi All,
Hope someone can help me with this small problem I'm having.
I have a 2 page form, using the multi-page plugin, and for the most part it works fine. But after the second/final page of the form I want to submit to an external site (Paypal) and this is where the trouble starts.
I can not figure out where to put the submit-to URL. If I put it in the "Submit URL" field of the last form it doesn't seem to take effect (I simply get a blank form shown when page 2 is submitted--which I believe is normal behavior if no Submit URL is defined). If I put the submit-to URL in the "Submit URL" field of the Mother Form, then ChronoForms submits to that URL after the 1st form instead of the 2nd form.
Any help would be appreciated. Thanks in advance.
Hope someone can help me with this small problem I'm having.
I have a 2 page form, using the multi-page plugin, and for the most part it works fine. But after the second/final page of the form I want to submit to an external site (Paypal) and this is where the trouble starts.
I can not figure out where to put the submit-to URL. If I put it in the "Submit URL" field of the last form it doesn't seem to take effect (I simply get a blank form shown when page 2 is submitted--which I believe is normal behavior if no Submit URL is defined). If I put the submit-to URL in the "Submit URL" field of the Mother Form, then ChronoForms submits to that URL after the 1st form instead of the 2nd form.
Any help would be appreciated. Thanks in advance.
Hi mamamia,
Use the ReDirect Plugin. I think it needs to be configured on the Mother Form. You can't effectively use an OnSubmit URL to do this.
Bob
Use the ReDirect Plugin. I think it needs to be configured on the Mother Form. You can't effectively use an OnSubmit URL to do this.
Bob
Does the Redirect Plugin actually perform a submit and send all the form variables across? Even though the hover help for the plugin says "Submit form data to another URL...", it doesn't appear as if my form variables are going over to Paypal. As a matter of fact it seems to be doing a GET instead of a POST.
So now, when I have the Redirect Plugin enabled, I do get sent to Paypal after the 2nd/final page of the form, but it lands me on Paypal's main page because the hidden variables ("cmd" and "hosted_button_id") that I have in my form, which Paypal provides to map to the correct cart, are not in the request.
Also, on a side note, no email is being sent from the Mother Form even though it is enabled and a template is in place. I believe the email stopped working once I enabled the Redirect Plugin.
Please help. Thanks.
So now, when I have the Redirect Plugin enabled, I do get sent to Paypal after the 2nd/final page of the form, but it lands me on Paypal's main page because the hidden variables ("cmd" and "hosted_button_id") that I have in my form, which Paypal provides to map to the correct cart, are not in the request.
Also, on a side note, no email is being sent from the Mother Form even though it is enabled and a template is in place. I believe the email stopped working once I enabled the Redirect Plugin.
Please help. Thanks.
Hi mamamia,
Yes it does a GET and transfers the user to PayPal. There's no way that I've been able to find of transferring the user with a POST.
You need to add the other variables in the ReDirect configuration - check the Help tab for details. There are also several examples in the forums here.
You need to manage the work flow sequence to get the ReDirect and the Email working together. The sequence is that the final child form is executed, then the mother form so if you are redirecting from the final child the mother form will never be reached.
This is quite complex stuff but if you follow it through step by step it does work logically.
Bob
Yes it does a GET and transfers the user to PayPal. There's no way that I've been able to find of transferring the user with a POST.
You need to add the other variables in the ReDirect configuration - check the Help tab for details. There are also several examples in the forums here.
You need to manage the work flow sequence to get the ReDirect and the Email working together. The sequence is that the final child form is executed, then the mother form so if you are redirecting from the final child the mother form will never be reached.
This is quite complex stuff but if you follow it through step by step it does work logically.
Bob
You need to add the other variables in the ReDirect configuration - check the Help tab for details. There are also several examples in the forums here.
The issue here is that the Mother Form has no form code/html (as it shouldn't based on usage instructions). Hence, the Redirect Plugin displays no fields in its General tab to map across. Using the Redirect Plugin on a regular, non-Mother Form, you actually see all of your fields in the plugin and can map them through to the page you are redirecting to.
I can hard-code key/value pairs for fields that I want send over in the General tab of the plugin. This works fine and they are transmitted via the GET request. But if I want a dynamic field (i.e. user picks between two price options in the final form) to be sent over, then I can't seem to do this as the Mother Field doesn't seem to display the child form fields in the Redirect Plugin.
You need to manage the work flow sequence to get the ReDirect and the Email working together. The sequence is that the final child form is executed, then the mother form so if you are redirecting from the final child the mother form will never be reached.
I am not redirecting from the final child. Per your suggestion, I put the Redirect Plugin on the Mother Form. The two non-Mother forms have no Redirect Plugin, no "Redirect URL" field defined, and no "Submit URL" field defined.
So never mind about the email issue. Apparently the emails were just delayed a few hours. I am receiving emails just fine. But my issue regarding the form fields from the non-Mother Form still stands. Is it not possible to pass these fields to the external site (i.e. Paypal) in a multi-page form?
Hi mamamia
Did you manage to resolve this?
I'm havig the same probelm.. the mother form will submit to paypal but i ahve hard coded the AMOUNT field in the redirect plugin and cant find a way to change it on the fly.
I'm guessing i may be able to do something with the "onSubmit" code area on the mother form.. but I have no idea what lol.
Thanks in advance 😀
Did you manage to resolve this?
I'm havig the same probelm.. the mother form will submit to paypal but i ahve hard coded the AMOUNT field in the redirect plugin and cant find a way to change it on the fly.
I'm guessing i may be able to do something with the "onSubmit" code area on the mother form.. but I have no idea what lol.
Thanks in advance 😀
same trouble here... this is the main issue : child forms fields are not passed to the mother form, so we can't send dynamic data (like address, name, email, etc... any data that's been submitted through one of the child form) to Paypal (for example).
Hi all,
I haven't tested this but I think it may give you a way around the problem. On the form where you want to use the PayPal (or cURL, or ReDirect) plugins add some dummy html to the Form HTML box inside comments
Bob
* If it isn't then try adding the type attribute too e.g. type='text'
PS I do have a newer version of the plugins in testing that will allow you to enter name={value} in the 'fixed' box that will get round this problem.
I haven't tested this but I think it may give you a way around the problem. On the form where you want to use the PayPal (or cURL, or ReDirect) plugins add some dummy html to the Form HTML box inside comments
<!-- <input name='xxx' /><input name='yyy' /> -->
This should be enough* to fool ChronoForms into showing the boxes you need in the Plugin Configuration. Bob
* If it isn't then try adding the type attribute too e.g. type='text'
PS I do have a newer version of the plugins in testing that will allow you to enter name={value} in the 'fixed' box that will get round this problem.
nice trick, it totally works ! that's neat thanks.
i have a 2-page multipage form.
Let's say the first child form sends data to an SQL table;
is it somehow possible in the second child form to fetch some of this data (especially the cf_id field) and have it re-used inside a hidden input field ? The point of this is to have an invoice number to sumbit to Paypal, using the redirect plug-in.
that would give something like this in the second form html code:
and then in the redirect plugin tab, have this field submitted to an external site (for my case it is paypal, so i can set the item_name value to include an invoice number, depending on the number of forms that have been filled)
I'm a total newbie in php and sql queries... the $db->f('cf_id') is just some random thing which should be replaced by some real sql query 😶
i have a 2-page multipage form.
Let's say the first child form sends data to an SQL table;
is it somehow possible in the second child form to fetch some of this data (especially the cf_id field) and have it re-used inside a hidden input field ? The point of this is to have an invoice number to sumbit to Paypal, using the redirect plug-in.
that would give something like this in the second form html code:
<input type="hidden" name="invoice_number" value="$db->f('cf_id')" />
and then in the redirect plugin tab, have this field submitted to an external site (for my case it is paypal, so i can set the item_name value to include an invoice number, depending on the number of forms that have been filled)
I'm a total newbie in php and sql queries... the $db->f('cf_id') is just some random thing which should be replaced by some real sql query 😶
Hi platipalapi,
You can get the cf_id from a saved record. ChronoForms makes all the saved data available in an object $MyForm->tablerow["jos_table_name"] including the cf_id.
That said I wouldn't use the cf_id as an invoice number but would generate a random string and use that instead. Using serial numbers makes it simpler for potential hackers to guess what other urls might be valid.
Bob
You can get the cf_id from a saved record. ChronoForms makes all the saved data available in an object $MyForm->tablerow["jos_table_name"] including the cf_id.
That said I wouldn't use the cf_id as an invoice number but would generate a random string and use that instead. Using serial numbers makes it simpler for potential hackers to guess what other urls might be valid.
Bob
i still had a hard time trying to make it work. I'm not very at ease with all this sql query stuff.
at first i wanted the cf_id number to appear in the "item_name" value submitted to paypal, so i could trace the payments made to me and make it match the forms i'd receive by mail (since i didn't find yet how to have mails being received AFTER payment is complete)
but that was a pain to do that. Because, after adding a hidden input 'invoice' in my first child form, i was not sure where to put that code exactly
should have i put it in the onsubmit before email code of mother form ? child form ? onsubmit after email ? redirect plugin extra code ? i gave up lol
so i actually followed your advice.
I just generated a random string (composed of letters and numbers) and assigned that value to the 'invoice' field, so then i could use this field all along the process and submit it to paypal.
my only concern is that i hope i won't get the same invoice number randomly generated twice (because Paypal doesn't allow billing the same invoice number twice). But that should be very little probable, since the random string generated is composed of 8 characters, mixing letters and numbers.
thanks a lot anyway for the help!
at first i wanted the cf_id number to appear in the "item_name" value submitted to paypal, so i could trace the payments made to me and make it match the forms i'd receive by mail (since i didn't find yet how to have mails being received AFTER payment is complete)
but that was a pain to do that. Because, after adding a hidden input 'invoice' in my first child form, i was not sure where to put that code exactly
<?php
$invoice = $MyForm->tablerow["jos_chronoforms_myformstable"]->cf_id;
JRequest::setVar('invoice', $invoice);
?>
should have i put it in the onsubmit before email code of mother form ? child form ? onsubmit after email ? redirect plugin extra code ? i gave up lol
so i actually followed your advice.
I just generated a random string (composed of letters and numbers) and assigned that value to the 'invoice' field, so then i could use this field all along the process and submit it to paypal.
my only concern is that i hope i won't get the same invoice number randomly generated twice (because Paypal doesn't allow billing the same invoice number twice). But that should be very little probable, since the random string generated is composed of 8 characters, mixing letters and numbers.
thanks a lot anyway for the help!
I have been wrestling with a multi-page form. My objective is to use the data of the fields for an email and then submit some of the same fields to an external site (the order is not important). I had each part working in each child form separately...as soon as I assembled the children under the mother form the forms stopped working together in part.
First, I was able to post externally but it would not email. I tried using the redirect plugin (since I could choose to post externally after sending email) this just doesn't seem to work...it is pulling the fields from the html form but the external site acts as if the data was not being sent...goes through the motion but reports a failure because it is missing something which I believe is being sent.
child form1 html
child form2 html uses profile plugin to populate hidden fields and pass to external site (an email autoresponder subscription form).
This form worked with an url 'action' to the external site...I have yet to get it working with redirect plugin. I get an error from the autoresponder subscription script that there is no 'email' being submitted so the subscription request is rejected.
There are probably many ways to make this work...what is the best? Is there a specials syntax to be applied to redirect plugin field map so the data from the child forms get's sent a certain way?
Should the redirect be used in the mother form or the child? Again, it was working very well for me until I asked it to send email and post externally in a multi form.
Thanks for any help with this.
Sean
First, I was able to post externally but it would not email. I tried using the redirect plugin (since I could choose to post externally after sending email) this just doesn't seem to work...it is pulling the fields from the html form but the external site acts as if the data was not being sent...goes through the motion but reports a failure because it is missing something which I believe is being sent.
child form1 html
<p>Name a client:</p>
<input type='text' id="assignment1_customer" name="assignment1_customer" type="text" size="40" />
<br>
<p>What's your objective?</p>
<input type='text' id="assignment1_objective" name="assignment1_objective" type="text" size="40" />
<br>
<a href="http://www.mysite.com/site/index.php?option=com_chronocontact&chronoformname=mother&cfformstep=2">next</a>
child form2 html uses profile plugin to populate hidden fields and pass to external site (an email autoresponder subscription form).
<div align='left'>
<p>Please choose 1:</p>
<p>Choice 1<input type='radio' name='id' value='218'>Description of choice 1</p>
</div>
<div align='left'>
<p>Choice 2<input type='radio' name='id' value='219'>Description of choice 2</p>
</div>
<div align='left'>
<p>Choice 3<input type='radio' name='id' value='220'>Description of choice 3</p>
</div>
<input type="hidden" name="userid" value="{user_id}" />
<input type="hidden" name="department" value="{cb_manageremail}" />
<input type="hidden" name="city" value="{cb_managerfirstname}" />
<input type="hidden" name="state" value="{cb_managerlastname}" />
<input type="hidden" id="email" name="email" size="40" value="<?php global $my; echo $my->email; ?>" />
<input type='hidden' name='subscription_type' value='E'>
<input value="Submit" name="button_1" type="submit" />
This form worked with an url 'action' to the external site...I have yet to get it working with redirect plugin. I get an error from the autoresponder subscription script that there is no 'email' being submitted so the subscription request is rejected.
There are probably many ways to make this work...what is the best? Is there a specials syntax to be applied to redirect plugin field map so the data from the child forms get's sent a certain way?
Should the redirect be used in the mother form or the child? Again, it was working very well for me until I asked it to send email and post externally in a multi form.
Thanks for any help with this.
Sean
actually, when you use the multipage form plugin, i found that it works better if you set all the actions (email sending, redirect), in the mother form.
that's something sure for the redirect plugin, though i'm not sure about the emails.
that's something sure for the redirect plugin, though i'm not sure about the emails.
I am trying to use curl instead of the regular CF redirect url in geral tab. It worked before, is there a trick to switching forms over to curl?
Sean
Sean
This topic is locked and no more replies can be posted.