How can I get an image in my form to display properly on mobile?

  • taxincentiveservices
    Asked on March 28, 2017 at 7:53 PM

    I have an image in my form with text boxes overlayed where responses are needed. It looks fine on a desktop view, however, when I view it on my iphone the image does not display fully (the right side of the image is cut off) and the text boxes are scattered around the form in the wrong locations. I have tried copying the iframe code into my weebly site and used the mobile responsive widget on jotform but the problem persists.

     

    A link to the form:

     

  • candy
    Replied on March 29, 2017 at 3:23 AM

    Hello,

    I have checked your form and cloned it on my side in order to test it. I have seen that you've injected some wrong CSS codes to your form which makes the form broken and unresponsive to mobile.

    When I deleted those CSS codes and previewed it on iPhone, the form looks good as you can see the screenshot below:

    How can I get an image in my form to display properly on mobile? Image 1 Screenshot 20

    Please delete those CSS codes or inject media queries to the CSS editor.

    Thanks in advance.

  • taxincentiveservices
    Replied on March 29, 2017 at 6:54 PM

    I can get the image to show up correctly when removing the injected CSS but I need to have text boxes overlayed on the image. To do that I have to use CSS. It looks fine on desktop but when I view it on my iphone the image gets cut off on the right and the text box is not in the right spot. I am using iframe with the mobile responsive widget.

  • Chriistian Jotform Support
    Replied on March 29, 2017 at 10:12 PM

    Hi,

    Please allow me some time to further check your form. I'll get back once I've found results.
    Regards.

  • taxincentiveservices
    Replied on March 29, 2017 at 10:15 PM

    Thank you so much for the assistance.

  • Chriistian Jotform Support
    Replied on March 29, 2017 at 10:49 PM

    Hi again,

    I checked your form and I noticed that there is an excess <style> tag on your form. Please remove this:

    How can I get an image in my form to display properly on mobile? Image 1 Screenshot 40

     

    It should look like this:

    How can I get an image in my form to display properly on mobile? Image 2 Screenshot 51

     

    The, please inject this custom CSS on your form to correctly position the text box when viewing it on mobile:

     

    @media screen and (max-width: 640px){

    input#input_4 {

        position: relative !important;

        width: 100px !important;

        top: -25px !important;

        height: 15px !important;

    }

    }

     

    Result:

    How can I get an image in my form to display properly on mobile? Image 3 Screenshot 62

     

     

    Let us know if you need further assistance.
    Regards.

  • taxincentiveservices
    Replied on March 29, 2017 at 11:15 PM

    Thank you! It looks better on the phone when vertical now. I think I can make that work for the whole form.

    I was wondering though, is there a way to have each text entry box's position and size related to the image I am overlaying them on. For example, could I could have a text entry box set to be 10% from the top of the image and 25% from the left and widths and heights also a % of the width and height of the image.

  • Chriistian Jotform Support
    Replied on March 30, 2017 at 1:12 AM

    Yes, you can adjust the position of the textbox according to your preferences. Just note that if you want the sizes, height, and position to properly view it on mobile view, you need to add the code inside the @media.

    Regards.