Show or hide fields based on what device the form is being accessed

  • oneillautodetailing
    Answered on January 06, 2019 05:02 AM

    Hello, just wondering if there is some conditional logic around what bits and pieces will be shown based on the device viewing the content?  I ask as some of my pictures look really fuzzy on mobile (portrait or landscape) but on tablet or PC look fine.

    It's page 2/17 that looks weird 


  • Michael JotForm Support
    Answered on January 06, 2019 06:28 AM

    In such cases, you can use the Get User Agent widget. Then, set up a SHOW/HIDE Field conditional logic. And perform the similar approach explained in this guide — Smart-Forms-Using-Conditional-Logic

    A screenshot of the submissions page of a form (clone of the form you shared) that has a Get User Agent widget is shown below.

    1546772599t06 01 52 Screenshot 10

    The widget is hidden in the form by default but will have the same value shown in the screenshot above of the submissions page.

    You will create conditions that will hide certain fields if the widget "contains" Android, Windows, etc...).

    Here's a sample condition.

    1546772774t06 05 54 Screenshot 21

    The form with the sample condition above viewed on an Android device.

    1546773061t06 09 22 Screenshot 32

    The same form viewed on a Computer (Windows).

    1546773286t06 13 50 Screenshot 43

    Notice that the form has different Page 2 contents when viewed on different devices.

    The "Before we get started here is a list of..." page is being hidden on the Android device as stated in the condition above.

    I hope this helps. If you have other questions or concerns, please feel free to contact us anytime.

  • oneillautodetailing
    Answered on January 06, 2019 07:43 AM
    Unreal, thanks 👍