• Having issues with buttons not showing up. It can be bypassed on desktop bc you can press enter but it is not an option on mobile.

    Saw where you gave someone an auto-submit code and now I can’t find it…also, not sure where to put it.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @mk8rocks,

    Looks like your main CSS file is hiding all buttons, this CSS should make it show, put this in the CSS for you theme or the custom editor in age gate advanced settings

    
    input[type=submit].age-gate-submit {
        display: inline-block;
        padding: 10px;
        margin: 20px 0;
    }
    

    You’ve also got a lot of info in the additional content, I’d be tempted to make that wider on big screens, something like this should do:

    
    @media screen and (min-width: 1024px) {
      .age-gate-form {
         max-width: 50%;
      }
    }
    

    For an auto submit, this JS would need to be added to one of your theme’s JavaScript files and enqueued:

    
    jQuery(function(){
      jQuery('.age-gate-input').on('keyup', function(){
        var submit = true;
    
        jQuery.each(jQuery('.age-gate-input'), function(idx, element){
          if (jQuery(element).attr('minlength') != jQuery(element).val().length) {
            submit = false;
          }      
        });
    
        if (submit) {
          jQuery('.age-gate-form').submit()
        }
      });
    });
    

    Thanks,
    Phil

    Thread Starter mk8rocks

    (@mk8rocks)

    Is there a way to see if this has effected the existing buttons on my pages? I’m not able to add things to my cart on the product pages…I hadn’t reviewed them prior to adding the code.

    Plugin Author Phil

    (@philsbury)

    Hi @mk8rocks,

    This will not have affected any other buttons on your site. As I said before, your theme or another plugin is hiding all buttons.

    See this image for the offending CSS

    Thanks
    Phil

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘No Buttons’ is closed to new replies.