How to populate Stripe with information from other form fields

  • siteazon
    Asked on April 1, 2016 at 5:14 PM

    I'm trying to auto populate fields in my form but without success.

     

    Here is the link to my form

    https://form.jotform.com/60868350359969

     

    So I am trying to have the Client First Name and Client Last name auto populate the stripe first and last name.  As well as the billing address fields need to autopoluate the individual address text boxes.

     

    Conditional logic does not work because the address fields are clumped together as one ID and it does not let me do it that way.  Same with the Stripe 3.  I also need to have 2 separate addresses because the billing address needs to be one clumped together ID in order to pass the billing address to stripe, but I also send the info to zoho which requires individual fields for street, city, zip, etc.

     

    I tried messing around with <script>

    function fill(){

    document.getelementById(‘input_48_cc_firstName’).value = document.getElementById(‘clientFirst34’).value; document.getElementById(‘input_48_cc_lastName’).value = document.getElementById(‘clientLast’).value ; }</script>

     

    onDISABLEDinput=‘fill()’

     

    But I usually just embed my form into my wordpress site and 1) I can't get it to work 2) Using source code embed makes the styling a mess.

     

    Please help!

     

    Thank you

  • Boris
    Replied on April 1, 2016 at 6:24 PM

    If you want for the name field inside the Stripe payment tool to automatically populate from another field on your form, please use a Full Name field for collecting the name:

    How to populate Stripe with information from other form fields Image 1 Screenshot 40

    You can then use conditional logic with update/calculate field conditions, and set it so that the value from your full name field is copied to the Stripe field:

    How to populate Stripe with information from other form fields Image 2 Screenshot 51

    Condition would automatically fill out the name field from Stripe payment tool as you are typing it into the full name field:

    How to populate Stripe with information from other form fields Image 3 Screenshot 62

    When it comes to populating an address field from individual fields, it is not possible with our current conditional logic, but you can indeed use custom scripts similar to the one you've depicted above. You would use the "clumped together" address field as the main one, where users will be entering their data, and then you can copy data from each individual field of the Address field over to your individual text box fields.

    The code you've posted had "smart quotes" in it, where opening quote is different than the closing quote, which may have caused your codes not to work when you were testing. You should use simple quotes in your JavaScript codes, such as " or ' quotes.

    <script>
    function fill(){
      // get data from Billing Address: Street, and paste it into Address Street
      document.getelementById('input_49').value = document.getElementById('input_17_addr_line1').value;
      // get data from Billing Address: City, and paste it into City
      document.getElementById('input_50').value = document.getElementById('input_17_city').value;
    }
    </script>

    The above script is only for the two fields "Address Street" and "City", but the same code can be used for other individual fields as well.

    I hope this helps, please let us know how it goes.

  • siteazon
    Replied on April 1, 2016 at 6:45 PM
    Thank you for your prompt response. However I cannot use the full name field as zoho needs fields to be separated individually when I integrate. I will try the code correction you have posted below.
    Sent from my iPhone
    ...
  • Welvin Support Team Lead
    Replied on April 1, 2016 at 7:09 PM

    I have reported the same issue before and this has been sorted already. I tried the integration and Zoho CRM allows me to map the Full Name field. 

    How to populate Stripe with information from other form fields Image 1 Screenshot 20

    Anyways, if the separate fields work for you then you can use that method. Let us know if you need more help with regards to this.

  • siteazon
    Replied on April 3, 2016 at 12:45 AM
    Thank you for your response. I have setup the integration with Zoho and it confirms authentication and I map all of my fields, but nothing ever passes through to my zoho leads. I have tried refreshing zoho, deleting the integration and reapplying it.
    If I go to edit the integration it says authentication failed, even though it said successful before.
    ...
  • Welvin Support Team Lead
    Replied on April 3, 2016 at 2:30 AM

    My sincere apologies. I need to move your issue with the Zoho Integration into a new thread as it is not related to the Stripe issue. Please find it here: https://www.jotform.com/answers/809174. I will be posting the same reply and if the issue persists, please update the correct thread instead.