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.

Possible to force enqueue_form_scripts()?

  1. I'm currently working on an implementation that uses Pods to power an Events section of a website. I'm using Gravity Forms to handle event registrations, and defining a relationship between an Event (Pod entry) and a single Gravity Form. I then pass that form ID to a Pod Page (which isn't technically a WordPress page) which in turn fires a do_shortcode() using the ID that was passed.

    The shortcode fires as expected, but the scripts are not enqueued. I realize this is a pretty big hack as far as Gravity Forms is concerned, and I'm just curious about any direction that can be offered.

    My attempt so far includes checking for the Pod page in the <head> of the document and if we're on an event registration page I fire:

    require_once( GFCommon::get_base_path() . "/form_display.php" );
    $form = RGFormsModel::get_form_meta( intval( pods_url_variable( -1 ) ) );
    GFFormDisplay::enqueue_form_scripts( $form );

    I var_dump()'d $form and the data is all there, but nothing seems to be enqueued. Again, I realize posting here is a stretch but I'd love to help other Pods users should they request support in this area. Thanks!

    Posted 14 years ago on Thursday October 7, 2010 | Permalink
  2. The Gravity Forms related scripts can be called via enqueue. You can find instructions for this at the bottom of the documentation page that discusses how to embed a form here:

    http://www.gravityhelp.com/documentation/embedding-a-form/

    Posted 14 years ago on Thursday October 7, 2010 | Permalink
  3. Wow jeesh usually I'm pretty good about RTFM but I missed that -- thanks a lot, Carl, works great.

    Posted 14 years ago on Thursday October 7, 2010 | Permalink

This topic has been resolved and has been closed to new replies.