Can I pass parameters from WordPress to JotForm?

  • Profile Image
    kakaka
    Asked on January 08, 2018 at 11:18 AM

    Good day! Can you please tell me how to solve this problem. I developed a website for women's clothing https://7hatka.ru designer for Wordpress sites. Now I want to introduce a calculator size. The size calculator I built in your service. Here's the code calculator size: https://form.jotformeu.com/80064151255347. Calculator conceived in the following way. It needs to calculate the size of a particular product (clothing). Size depends on two factors. The first factor is a four input parameters: {1} - №1, {2} - №2, {3} - №3, {calk12} - №calk. The second factor is three parameters shapes the buyer (Грудь, Талия, Бёдра). Now the question is. How can you connect the four inputs of the calculator with the four fields of the trademark record (post)? So that the values from the post fell into the calculator. Might have some tools or plugins. I'm not a programmer, I'm just an advanced user. Tell me how to do the integration of the calculator with the site?

  • Profile Image
    Kevin_G
    Answered on January 08, 2018 at 12:06 PM

    I think you may create a link to your form prepopulating the values to the fields, please check this guide that will help you prepopulating fields: https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters 

    But your users will be redirected to the Jotform form where they will complete the purchase. 

    Now, if you need to allow users to purchase without leaving your website, then you will need to get the source code and use some code to pass the values into the fields. This guide will help you getting the source code of your form: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form 

    I hope this helps. 

  • Profile Image
    kakaka
    Answered on January 10, 2018 at 10:55 AM

    Thank you for the tip! It worked for me. Your form designer, the best in the world!

  • Profile Image
    kakaka
    Answered on January 16, 2018 at 01:53 AM

    Good afternoon! Tell me please. I have a form:

    https://form.jotformeu.com/80148666746366?1=0&2=0&3=0&calk12[0]=true. 

    I want to use the method of publishing - a lightbox. Here's the lightbox code:

    <script src ="https://form.jotformeu.com/static/feedback2.js" type="text/javascript"></script><script type="text/javascript"> var JFL_80148666746366 = new JotformFeedback({ formId: '80148666746366', base: 'https://form.jotformeu.com/', windowTitle: 'тест', background: '#FFA500', fontColor: '#FFFFFF', type: '1', height: 500, width: 700, openOnLoad: false }); </script> <a class="btn lightbox-80148666746366" style="margin-top: 16px"> Новое ТЗ лайтбокс </a>

    What changes need to be made to the lightbox code to automatically fill fields: 1 = 0 & 2 = 0 & 3 = 0 & calk12 [0] = true

  • Profile Image
    Nik_C
    Answered on January 16, 2018 at 04:00 AM

    You can prepopulate the Lightbox on load. Here is how: https://www.jotform.com/help/83-Adding-parameters-in-Lightbox-and-Feedback-forms

    And for your form it would be like this:

    <script src ="https://form.jotformeu.com/static/feedback2.js" type="text/javascript"></script><script type="text/javascript"> var JFL_80148666746366 = new JotformFeedback({ 

    formId: '80148666746366', 

    base: 'https://form.jotformeu.com/', 

    iframeParameters: {

         'input13': '12',

         'input14': '13',

         'input15': '14',

         'input16': '15',

         'input47': '15'

    },

    windowTitle: 'тест', 

    background: '#FFA500', 

    fontColor: '#FFFFFF', 

    type: '1', 

    height: 500, 

    width: 700, 

    openOnLoad: false }); 

    </script> <a class="btn lightbox-80148666746366" style="margin-top: 16px"> Новое ТЗ лайтбокс </a>

    The code in yellow is prefilling the form, the input13, input14, input15 etc, are the field names, and the values on the right are the ones prefilling the form, so you can change those to to fit your needs.

    Let us know if you have any further questions.

    Thank you!

  • Profile Image
    kakaka
    Answered on January 16, 2018 at 05:18 AM

    I managed! Now I want to go further. The form code is set on the merchant record page (post wordpress). The post has fields {№1}, {№2}, {№3}, {№calk}. How to make the values of these fields fall into the lightbox code (instead of the yellow numbers). See also the picture below.

    <script src ="https://form.jotformeu.com/static/feedback2.js" type="text/javascript"></script><script type="text/javascript">

            var JFL_80148666746366 = new JotformFeedback({

              formId: '80148666746366',

              base: 'https://form.jotformeu.com/',

    iframeParameters: {

     '1': '0',

     '2': '0',

     '3': '0',

     'calk12[0]': 'true'

        },

              windowTitle: 'тест',

              background: '#FFA500',

              fontColor: '#FFFFFF',

              type: '1',

              height: 500,

              width: 700,

              openOnLoad: false

            });

        </script>

          <a class="btn lightbox-80148666746366" style="margin-top: 16px">

            Новое ТЗ

          </a>

    ====================================

    1516097906Безымянный.png

  • Profile Image
    Nik_C
    Answered on January 16, 2018 at 05:43 AM

    And those fields on the left (in your image) are those from some other form as well or from the WordPress website?

    Also, could you share the website's URL, since I'm not sure if it is possible what you're asking?

    We'll wait for your response.

    Thank you!

  • Profile Image
    kakaka
    Answered on January 16, 2018 at 05:51 AM

    These fields are on the website. They have every commodity record (post). Their values are different for each post. The jotform shape is built into each post. Here is an example of a post: https://7hatka.ru/3526_plat-ya/plat-e-p5-3665-1/

  • Profile Image
    Ardian_L
    Answered on January 16, 2018 at 06:23 AM

    Can you please point out which fields are those exactly. Also the field's name can't be: 1 or 2

    iframeParameters: {

     '1': '0',

     '2': '0',

     '3': '0',

     'calk12[0]': 'true'

        },

    Please check their proper name and replace '1','2','3' numbers. 

  • Profile Image
    kakaka
    Answered on January 16, 2018 at 07:47 AM

    Thank you for your help, I solved the problem in a different way.

    There is one small question. How can I change the transparency of the background around the lightbox. Tell me please.
  • Profile Image
    Kevin_G
    Answered on January 16, 2018 at 07:56 AM

    In order to assist you better I have moved your last question to another thread, we will assist you as soon as possible here: https://www.jotform.com/answers/1350571