Is there a way to make the lightbox form responsive?

  • TWCforms
    Asked on July 8, 2016 at 11:47 AM

    using my phone the page is not sizing for full view on the display.

  • Welvin Support Team Lead
    Replied on July 8, 2016 at 1:07 PM

    I'm sorry, but our lightbox form is currently not optimized for mobiles, but a workaround can be made to make it responsive. Please replace your lightbox codes with the following:

    <script src="https://form.jotform.me/static/feedback2.js?3.3.REV" type="text/javascript"> 

     

      // get current width of the window

        var parentWidth = window.innerWidth;

        var parentHeight;

        // check if the window size is less than 499, assuming that it means it is viewed on a mobile device

     

        if(window.innerWidth <= 499) {

        parentWidth = window.innerWidth; // if it's in mobile view assign the current width to this variable

            parentHeight = window.innerHeight - (window.innerHeight * 0.1);

        } else {

        parentWidth =  700; // if it's viewed on a window larger thatn 499px then set the width to 500px

            parentHeight = 500;

        }

     

    var JFL_61805345450452 = new JotformFeedback({ 

    formId: '61805345450452', 

    base: 'https://form.jotform.me/', 

    windowTitle: '', 

    background: 'transperent', 

    fontColor: '#FFFFFF', 

    type: 'false', 

        height: parentHeight,

        width: parentWidth,

    openOnLoad: true 

    }); 

    </script>

     

    Please inform us here if you'll find a new issue after changing the codes.