What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Prepopulating fields in lightbox form from Shopify cart page?

    Asked by CoverArtFactory on October 23, 2013 at 08:43 AM

    Shopify (cart.liquid)

     

     

    <a target="_blank" href="{{ item.product.url }}">

                    <img src="{{ item.product.featured_image | product_img_url: 'thumb' }}"  alt="{{ item.product.title }}" />

        </a>

     

     

    item.product.title is where the product name is displayed when checking the souce on Shopify cart page.

     

    So I have added this to Shopify (cart.liquid). item is what I named the field in my jotform ( Name: {item} )

     

     

    <script src="//cdn.jotfor.ms/static/feedback2.js?3.1.90?item={{ item.product.title }}" type="text/javascript">

    new JotformFeedback({

    formId:'32543714967361',

    base:'http://jotformeu.com/',

    windowTitle:'Artist, title and picture',

    background:'#FFA500',

    fontColor:'#FFFFFF',

    type:1,

    height:500,

    width:700,

    openOnLoad:true,

    iframeParameters: {noJump: true}

    });

    </script>

     

    But Jotform does not prepopulating my item text field with the shopify item product name?

     

    lightbox form prepopulating fields JotForm text field style name
  • Profile Image
    JotForm Support

    Answered by guilledutra on October 23, 2013 at 10:21 AM

    Hi,

    As JotForm forms and Shopify are separated systems, I'm afraid it won't be possible to prepopulate a form lightbox with content generated by a shopify function(in this case the item).

    I have no experience with shopify, anyways the right way to pre populate lightbox form is by adding the pre populate parameters to the "iframeParameters" section of your lightbox code:

    <script src="//cdn.jotfor.ms/static/feedback2.js?3.1.90 type="text/javascript">

    new JotformFeedback({

    formId:'32543714967361',

    base:'http://jotformeu.com/',

    windowTitle:'Artist, title and picture',

    background:'#FFA500',

    fontColor:'#FFFFFF',

    type:1,

    height:500,

    width:700,

    openOnLoad:true,

    iframeParameters: {

         'item':'item field content',

         'noJump': 'true'

    });

    </script>

    Hope it helps

    Thanks