How do I pass a calculation value to a payment field on another form?

  • Profile Image
    rockblinka
    Asked on August 06, 2017 at 11:36 AM

    Hi, I don't get about how to do the link or set it, can you please explain it better because I don't know from where comes {total} or hot you set in the URL. Please help! :)



    This is a re-post of a comment on How to Pass a Form's Calculated Value to another Form's Payment Total Field?

  • Profile Image
    Kevin_G
    Answered on August 06, 2017 at 12:50 PM

    The {total} is the name of your Form Calculation widget, the one where you get the total of the selected options on your form. 

    The name may change, this guide will help you to get it: https://www.jotform.com/help/146-How-to-Find-Field-IDs-and-Names 

    You could also share us the forms you're working on as well as the fields you need to pass over, we will be glad to take a look on them and help you creating the link. 

     

  • Profile Image
    rockblinka
    Answered on August 09, 2017 at 06:31 AM

    Hi thank you, but I don't achieve it. https://eu.jotform.com/build/72173226464354 this is form I'm doing but first of all it appears by sections and not complete shown in the page. I don't know if it's because it is a sample or still under construction. The main question would be how to integrate total amount (given by the calculation widget) with Stripe ? Do I have to do a stripe form?

    https://form.jotformeu.com/72173226464354 (this is the link from the preview)

    Please let me know and thanks again!

  • Profile Image
    Welvin
    Answered on August 09, 2017 at 10:30 AM

    You are using the New Form Layout. You can keep the legacy mode by selecting the option in the form settings:

     

    As for the original question, you are commenting on the help article that is related to passing a form data to another form. However, it seems that you only want the total in the form to get passed to the payment field on the same form. If this is correct, here's how you can do it:

    https://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field

    Yes, you would need to add Stripe in the form in order to do this.

    If you really want to pass the total to another form, you would need to setup the redirect URL. The guide gives you all the detail for doing this method. 

    Let us know if you need further assistance.

  • Profile Image
    rockblinka
    Answered on August 10, 2017 at 06:29 AM

    Hi guys, 
    Thank you so much with this, I just had an idea about how to add paypal and Stripe as a multiple payment form: Is this possible add a "Main form" (with payments options to select) with the hide/show fied and once the client select the payment he/she wants show the form and in the end the total where he can pay directly with the option he/she select in the beginning? I mean in the beginning of the page where the forb would be set, the first thing that will appear is the form where the client can select the payment option and then it would show the form with the option he needs, once he has selected the options it would be shown a total which he would pay with the payment option he has selected before.
    Is this clear if so it can be possible?
    Thank you guys!

  • Profile Image
    EkinDS
    Answered on August 10, 2017 at 08:15 AM

    It is possible to create a form where you can do this. However, it will require you to create a few other forms. A main form where the decision on which payment type to choose will be made and one form for each payment method you want. Here are the steps on how you can do this:

    1) Create the main form and use an element to choose the payment type.

    2) Create seperate forms for each payment methods which only contain the payment widgets.

    3) Copy the link of the form under he Publish menu. The link will be used in the main form.

    4) On the main form, create an Iframe Embed widget. These widgets are used to show other forms in a form. Paste the url of the payment form you made previously in teh "Frame url" space in the widget settings of the Iframe Embed widget. 

    5) Create one form for each payment method you want available and repeat steps 2, 3 and 4.

    6) Create a condition from the Settings menu to decide which payment method will be chosen when which choice is selected at the beginning. 

    If you are not able to solve your problem with the method given above, do not hesitate to contact us again. 

  • Profile Image
    rockblinka
    Answered on August 11, 2017 at 08:17 AM

    Hi guys, really really sorry for bother you but until now I have my form like this https://form.jotformeu.com/72173226464354 as you can see PayPal option is showing "cero" because I want to integrate it (also Stripe) with the total the client has so he can pay the amount shown in the shown option to pay. My question is now: how I can integrate the total with the payments due to in the individual forms for the payments is not the calculation widget, the prices for calculation are in the main form called "Precios de servicios" but I have added the Embed widget of payments in another form called "forma de pago". So how I can get the total integrated with the payment options if I can't do the calculation widget in the main form to setup it in the total? Or can I do this?
    Please let me know.

  • Profile Image
    Nik_C
    Answered on August 11, 2017 at 09:49 AM

    If I understood you right, you would like to pass the price from the main form to the sub-forms (payment forms):

    I'm not sure that that would work. Since the value can only be passed with prepopulate URL, and I'm afraid that you can not do that with payment fields. 

    I tried with a workaround where you will have another field in each payment (Form calculations widget) which could be prepopulated via URL, but you have payments embedded in the form and that form embedded in the main form, so I don't see how to pass the value to the third layer of forms.

    If that is what you're trying to achieve?

     

  • Profile Image
    rockblinka
    Answered on August 11, 2017 at 10:31 AM

    Yes, that's exactly I would like to do. What if I just use the main form (where the total and prices per service are) and just add the payments in embedded widget? could be this possible or some advice to achieve something similar?

    Thank so much!

  • Profile Image
    Chriistian
    Answered on August 11, 2017 at 11:59 AM

    As per checking, we cannot prepopulate/pass the value of your calculated field from your main form to the embedded form. A workaround for this is to redirect to the pre-populated payment form URL instead of embedding it to your main form. Here is a sample form that you can check: https://form.jotform.com/72224334449960. On the form, I have setup a Change "Thank You" page condition to redirect to the payment for depending on what the user selected.

    On the condition, you will notice that I have used the prepopulated URL of the form to transfer the amount value from the main form to the payment form.

  • Profile Image
    rockblinka
    Answered on August 11, 2017 at 01:43 PM

    Thank you, guys!! Love you! :) I could do one of my forms! By the way I think I will add both options (PayPal and Stripe) but in diferent forms where the client in the page can select by a link which payment desires.

    Thanks!

  • Profile Image
    Kevin_G
    Answered on August 11, 2017 at 01:44 PM

    Glad to know you were able to figure it out. 

    Please if there is anything else that we can assist you with, let us know, we will be glad to help you.