Horizontal Form script makes mobile form not working

  • 12 September 2017
  • 1 reply
  • 4 views

Badge

Hi guys,
I used the script to have horizontal forms on landing page -> https://landing.filotrack.com/hype-it-filo-2-0-visitatori-sito/

This is the script I used (I had to remove closed tags “< >” from “script” because the script didn’t show in my question)

<script>
/**
    * Do not remove this section; it allows our team to troubleshoot and track feature adoption. 
    * TS:0002-08-042
*/
  lp.jQuery(document).ready(function($) {
    
    //Change #lp-pom-box-01, etc. for the IDs of the boxes where you want the form fields to display.
    var boxes = ["#lp-pom-box-50",
                 "#lp-pom-box-51"];
    
    $('.lp-pom-form .lp-pom-form-field')
      .each(function(i, field) {
        $(field)
          .offset($(boxes[i]).offset())
          $(this).children().width($(boxes[i]).width()-16)
      });    
  });
</script>

Now I don’t need to have horizontal forms on mobile devices and I would like to have just the normal form on mobile version of the landing page.

The problem is that I cannot find out how to do that and I can’t make the form working on mobile version.

Can you help me?


1 reply

Userlevel 7
Badge +1

Hey Andrea!

If you were working off of our post in the Tips and Scripts category, it mentions that the functionality will not appear in mobile. Check out that post 👉 here

If you implement this script on your landing page, the form should appear as usual (vertically stacked) on your mobile page, and horizontally on your desktop page.

Hopefully that answers your question, keep me posted on how that goes! 🙂

Reply