Support » Plugin: Genesis Simple Hooks » jQuery called in footer issue

  • Resolved jordaniversen

    (@jordaniversen)


    Hello,

    I am having an issue when I use Gravity Forms in conjunction with this plugin. I have input masks on my forms that limit certain fields to only alpha characters up to a limit of 20 character can be input.

    This works just fine and as intended on a regular page that I have added the form to, but when I add the form via the Genesis Simple Hooks plugin, this functionality does not work.

    I contacted Gravity Forms and they stated that it is because for some reason the jQuery is being called in the footer instead of the header (as wordpress does out of the box). I am not sure how to go about fixing this, so I would appreciate any assistance, thanks!

    -Jordan

    https://wordpress.org/plugins/genesis-simple-hooks/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    WP does not load jQuery by default.

    You’ll have to track down which plugin you have that is enqueuing jQuery first.

    Hi Ron, and thanks for the quick response.

    The thing is, if I add a form on a page, everything is working as it should be, so as far as a plugin conflict with Gravity Forms overall, there does not seem to be an issue.

    I have deactivated all the other plugins besides Gravity Forms and the Genesis Simple Hooks plugin, and still had the same issue.

    Where I run into the problem is when I add the forms via the Genesis Simple Hooks plugin. I have a small bit of PHP code that states if it is not a landing page, execute gravity form shortcode. That is all working properly. It is the input masking that is not working, unless you access one of the forms on a regular page, then everything is just fine, so it seems like it is specific to this plugin, but please correct me if I am wrong.

    Thanks again,

    Jordan

    Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    It is the input masking that is not working, unless you access one of the forms on a regular page, then everything is just fine, so it seems like it is specific to this plugin, but please correct me if I am wrong.

    Sounds like the way Gravity Forms is enqueuing jQuery doesn’t work correctly when you add the form via a hook.

    Everything that you do with Simple hooks can be done in your theme functions file. In all likelihood you would have the same issue if you added the form via the same hook in the theme functions file.

    You’ll have to follow up with the GF folks and see if they have a work around.

    Hi Ron,

    Thanks again for the reply. So I got some assistance from StudioPress (Thanks Nick), and they thought it was an issue with the enqqueuing as well and gave me the following code to add to the functions.php file:

    add_action( 'wp_enqueue_scripts', 'child_enqueue_scripts' );
    function child_enqueue_scripts() {
    wp_enqueue_script( 'jquery' );
    }

    This did the trick. I hope that helps out someone else in a similar situation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘jQuery called in footer issue’ is closed to new replies.