How to concatenate the element values and pass it to Stripe?

  • antoinedubuc
    Asked on April 18, 2024 at 1:52 PM

    Hi,

    I have a form to sell gift cards with ten text fields to capture distinct email addresses.

    The visibility of each is controlled by a dropdown ('How many gift cards?') which lets the user capture the email for each gift card.

    So if the user wants 3 gift cards and choose 3 from the drop down then the first three text fields will become visible.

    The user will enter in each textfield the gift card recipient email and then its Stripe payment time.

    I need to pass to Stripe the emails.

    This form is part of a Zapier flow and I'll subsequently extract the emails and do actions for each.

    How can I concatenate and pass in the emails to Stripe?

  • Sidharth JotForm Support
    Replied on April 18, 2024 at 2:43 PM

    Hi Antoine,

    Thanks for reaching out to Jotform Support. I checked your form and you have added conditions to show the number of email elements. Do you want to pass these email addresses to the Stripe payment element?

    You can add conditions to concatenate all the email field data in a short text element and pass it to the Custom Data Field of the Stripe element. Let me show you how:

    1. In Form Builder, click on the Add Form Element menu on the left side of the page.
    2. Click on the Short Text element and drag it to add it to the form. Let's label it All email addresses.

    How to concatenate the element values and pass it to Stripe? Image 1 Screenshot 70

    Now, let us concatenate and add all the email addresses in the short text element

    1. Click on the Settings tab from the orange navigation bar.
    2. Click Conditions on the left menu.
    3. Select the UPDATE/CALCULATE FIELD condition.
    4. Add condition as shown below:
    5. In IF, select the First email element.
    6. In STATE, select Is Filled.
    7. In DO, select Calculate Field Value and add the First email element to the calculation.
    8. In Summary, select the All Email addresses element.

    How to concatenate the element values and pass it to Stripe? Image 2 Screenshot 81

    Similarly, you should add conditions to add the email addresses of all 3 elements. The condition should look like this.

    How to concatenate the element values and pass it to Stripe? Image 3 Screenshot 92How to concatenate the element values and pass it to Stripe? Image 4 Screenshot 103How to concatenate the element values and pass it to Stripe? Image 5 Screenshot 114

    Now, let us pass the value of the all email addresses element to the Stripe element.

    1. In Form Builder, click on the Stripe payment element and then click on the Wand Icon.
    2. In the Payment Settings window, click on the Gear icon.
    3. Click on the Additional Gateway Settings accordion.
    4. In the Custom Data Field, select the All email addresses option.

    How to concatenate the element values and pass it to Stripe? Image 6 Screenshot 125

    That's it. Here's the cloned version of the form you can test and clone.

    Give it a try, and let us know if there's anything else I can help you with.

  • antoinedubuc
    Replied on April 19, 2024 at 2:15 PM

    Maybe? the best. ever. technical support reply I've received? The proof of the pudding is in the video and wow, just wow. Thank you!

    The only thing I added was a semi-colon between the email to make them parser friendly down the line.

    thank you again!


    Antoine

 
Your Answer