How to save the transaction ID next to other submitted data?

  • sudsport
    Asked on February 3, 2016 at 10:02 AM

    Hi,

    Very often people are registering under one entity and paying using another one, how can I import into the Thank You Page payment form data such as Fisrt Name and Name in the thank you page so that I can directly connect the payment to the initial registration.

    So in my thank you page how can I fille in the field Nom and Prenom using the URL adress.

    I tried the following: https://form.jotform.com/60303839711957?q30_prenom="Geo"&d28_nom="TEST"

    Without success.

    Thanks for your help,
    Regards,
    Georges

     

  • Ben
    Replied on February 3, 2016 at 12:19 PM

    If I understood you correctly Georges, you would like to pre-fill the values of your form.

    To do that, you were on the right track, but a slight modification was needed. This is the link that would pass Geo for last name and TEST for first name:

    https://form.jotform.com/60303839711957?prenom=Geo&nom=TEST

    Basically it is the tag / name of the field, without the ID number of the same.

    This is the guide that will show you more about this: How to find Field IDs & Names

    Now I do suggest taking a look at the following guide as well: Prepopulating fields to your JotForm via URL parameters

    In case you are passing the values from some form to another form, the same applies, but we reference the fields in the current form using these brackets: { and }

    So if we were to pass the value from some form that also has prenom and nom fields, we would do it like this:

    https://form.jotform.com/60303839711957?prenom={prenom}&nom={nom}

  • sudsport
    Replied on February 3, 2016 at 1:08 PM

    Hi Ben,

    Great ! unfortunately it does not work wheen the form is embed in our web page with iframe, any clue ?

    So now we are able to make a correct link between the original Jotform and the Thank You page which is used for payment through PayPal API.

    I see that PayPal transaction ID is fed back into the calling thank you page, now is there a way to cascade the PayPal Transaction ID back to the original form submission which called the thank you page ?

    Thanks for your help and continuing support.
    Regards,
    Georges

    Here is my call to the thank you page:

    http://www.sud-sport.com/inscriptions_formulaire.php?course=60304086171952&prenom=georges&nom=portailler&inscription=330335995414719529&nom_course=Paiement%20en%20ligne%20Trail%20du%20Berger%20&h_forms=1520&h_forms=1520

  • David JotForm Support
    Replied on February 3, 2016 at 3:08 PM

    As far as I know, adding the code in iFrame will only work if the value is static and not dynamic. The iFrame prevents any external codes or scripts to affect the fields inside the iFrame code.

  • sudsport
    Replied on February 3, 2016 at 5:46 PM

    Hi David,

    I eventually solved the issue by putting variable names and values in the iframe string.

    Exemple:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.com/<?php echo $course ?>?nom=<?php echo $nom ?>&prenom=<?php echo $prenom ?>&inscription=<?php echo $inscription ?>" frameborder="0" style="width:100%; height:<?=$hforms?>px; border:none;" scrolling="yes"></iframe>

    Now I am still running at finding out the way to feed back the PayPal transaction ID into my submission records.

    Regards,
    Georges

     

  • Chriistian Jotform Support
    Replied on February 4, 2016 at 1:31 AM

    I am glad to know that your issue has been resolved. You can retrieve the transaction ID (txn_id) variable by inserting the tag {myPaypal:transactionid} to your email notification. For more information, please check out this thread: http://www.jotform.com/answers/239818

  • sudsport
    Replied on February 4, 2016 at 2:41 AM

    Hi Christian,

    Thank you, I already have it in the thank you page bus I was looking for a way to have it updated automatically into the original calling form ie cascading up from paypal to thank you page to calling form.

    Or is it possible to skip the thank you page for payments ?

    Regards,
    Georges

  • Chriistian Jotform Support
    Replied on February 4, 2016 at 3:55 AM

    If I understand correctly, you want to send the transaction ID to the submission of the original form? I do believe it is not possible to do so. It is also not possible to skip the thank you page for payments.

  • sudsport
    Replied on February 4, 2016 at 5:07 AM

    Yes you understood correctly.

    I've got the answer, toooo baaad !

    Can the request b passed over to development team ?

    Have a great day.
    Regards,
    Georges

  • Ben
    Replied on February 4, 2016 at 9:15 AM

    I believe that the record of the transaction ID is already saved next to your form fields, but just not displayed - but I could be wrong on this, however as my colleague pointed out, it is available for emails and thank you page, so at that time it should be possible to make a record of the same as well.

    As such I will raise this as per your request to our developers to check and see if they would implement it so that each time someone makes the payment, transaction ID is saved within the transaction values on your form.

    In regards to your PHP URL trick above, that is the correct way to do it, I would however suggest a method that is a bit easier to change at a later point:

    instead of:

    <?php echo $course ?>?nom=<?php echo $nom ?>&prenom=<?php echo $prenom ?>&inscription=<?php echo $inscription ?>"

    to

    <?php
    $url = $course . '?';

    if( !empty($nom) ) { $url .= 'nom=' . $nom . '&'; }

    if( !empty($prenom) ) { $url .= 'prenom=' . $prenom . '&'; }

    if( !empty($inscription) ) { $url .= 'inscription=' . $inscription; }

    ?>

    ....

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.com/<?php echo $url; ?>" frameborder="0" style="width:100%; height:<?=$hforms?>px; border:none;" scrolling="yes"></iframe>

    That way all the logic that you might need to add or remove latter on is done before the actual output into the URL and the iframe code is not as complex any more (if a change needs to be made).

    Of course both work and you should use the one you are comfortable with.

    In regards to your request. If it gets approved and built into the system, we will update you about the same through this thread.

  • sudsport
    Replied on February 4, 2016 at 12:42 PM

    Hi Ben,

    Thanks for the provided php code which is far better for maintenance than mine, I'll change it that way.

    Thanks for having raised my request to development team.

    Best Regards,
    Georges