New Landing How can we help? Atelier Gravity forms with conditional fields doesn't show on mobile

Viewing 9 posts - 1 through 9 (of 9 total)
  • Posted in: Atelier
  • #247368
    Pothe
    Member
    Post count: 336

    Hi,
    I have a gravity form with conditional fields. Shows fine on computer but won’t show on mobile or responsive sized browser if refreshed at mobile size.

    I have checked everything I can think of. If I remove conditional values the form shows.

    https://www.evernote.com/l/ABUBoGiTi51Pqb_5Iwj7j-79QZimbaasa_w

    Only thing I can find is some comments about theme compatibility:
    https://wordpress.org/support/topic/breaks-gravity-forms-that-have-conditional-logic

    Any ideas would be great.

    #247372
    Pothe
    Member
    Post count: 336

    I found this:
    https://www.codementor.io/tips/8379241707/why-is-your-gravity-form-with-conditional-logic-not-showing-up

    #gform_wrapper_18{
    display : block !important;
    }

    This helps to show the form but seems to override the conditionals and shows all fields.

    #247837
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    It’s not clear what fields are being hidden, please add annotated screenshots to illustrate your issue.

    Please check that a media query is not hiding the input using the Chrome web developer inspector tool.

    Thanks.

    #247905
    Pothe
    Member
    Post count: 336

    Hi,
    Sorry for not being clear. But the screenshot I sent shows that the whole form is being hidden. The page link shows the form being shown.

    You can easily replicate this by first loading the page. Then drag to reduce the screen size to mobile resolution and refresh the page.

    Does this help?

    #247934
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    The plugin is adding display: none to the output, please see screenshot. Is there are admin setting to control the what is hidden in each viewport.

    Please also log a ticket with the plugin developer as the theme is not adding that code.

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #248084
    Pothe
    Member
    Post count: 336

    Hi,
    Gravity forms says it is a theme related issue:

    https://www.gravityhelp.com/question/why-is-there-a-style-attribute-of-displaynone-being-added-my-form-isnt-showing-up/

    “Anytime conditional logic is present the entire form is set to display: none; and then javascript is used to only show the fields that should be shown”

    “HOWEVER this requires Gravity Forms being able to output the necessary Javascript using the WordPress built in enqueue function… which outputs the Javascript in your footer.

    Your theme probably does not have this function call in your theme’s footer.php file:

    view sourceprint?
    1
    <? php wp_footer(); ?>

    “This function call, which all themes should have (but many people forget to include), enables plugins to output code in the footer of a theme dynamically. If it isn’t present, the theme can’t output the necessary code.”

    Any ideas how to overcome this?

    #248088
    Pothe
    Member
    Post count: 336

    More information for you…

    If I add this to the CSS:

    
    #gform_wrapper_1{
        display : block !important;
    }
    

    The form and all the fields show. However, this is not what I want as they are conditional. Also the Ajax in the form is not working so the next buttons don’t function.

    This is only happening when the theme is in responsive mode. It must be something to do with javascript.

    #248434
    Pothe
    Member
    Post count: 336

    The social share plugin needed updating. It was causing a conflict.
    Thanks

    #248435
    David Martin – Support
    Moderator
    Post count: 20834

    Glad you got it sorted.

    Thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.