PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Passing a JS callback function to an AJAX-enabled Gravity Form

  1. Pippin Williamson, over at Pippin's Plugins, recently released what I consider to be an indispensable tool for any WordPress admin: Simple Notices Pro Plugin.

    It allows you to display site-wide notices to all your users or to selected levels of users, with fine-grained control over styling and lots of handy options, such as hiding the close button. This is one of those plugins which, once you use it, you keep thinking of new things you want to use it for.

    His most recent update adds a feature that will be particularly interesting to Gravity Forms users: you can insert a small form into a notice requesting a certain piece of information, such as an email address or a vote or a survey question, and the notice will only disappear upon successful submission of the form.

    Just off the top of my head, I can see that would an extremely useful nudge for users to, say, upload an avatar image or fill in some new piece of info that you are adding to user profiles, such as nationality or gender or whatever - you would not be forcing them to submit the requested info, you would not be denying them access to any content, but the notice remains in place until they take the time to submit the form.

    In order to make this work, you must add this line of code to your jQuery:

    $('#notification-area').closeNotice('fade');

    ... so, does anyone know if there is an easy way to pass a JS callback function to an AJAX-enabled Gravity Form?

    Posted 12 years ago on Wednesday February 22, 2012 | Permalink