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.

Embedding Form within WP-Admin

  1. When I use gravity_form via PHP to embed a form while in /wp-admin/ (it's in a thickbox inline popup) it appears to not function as expected. This is likely because it wasn't meant to be displayed in /wp-admin/ -- are there any workarounds?

    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  2. I don't think this has ever been tested. We will have to take a look and see what it is going on.

    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  3. It appears to be the form 'editor' without the script / styles to properly edit. (Edit / Delete buttons all over, disabled fields, etc..)

    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  4. BTW, this seems to be the result of an is_admin() check.

    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  5. The script enqueue function also won't work for the same reason (does a !is_admin() check)

    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  6. Yes, the enqueue does an !is_admin check so it doesn't enqueue the scripts in the admin area. We will look into this and see what can be done to make the function calls work in the admin. It may require an additional parameter be added to tell it it's being used in the admin.

    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  7. Perhaps something like this would be better:

    if (!is_admin() || (is_admin() && isset($_GET['page']) && (false === strpos($_GET['page'], 'gf_') || 0 < strpos($_GET['page'], 'gf_'))) {
        // show regular form or enqueue scripts / styles depending on the function
    }
    Posted 13 years ago on Tuesday April 5, 2011 | Permalink
  8. ScOttkclark... did you get this to work.. i am trying the same thing... if so what file does the code go in....

    I started this thread on got directed here.. thanks

    http://www.gravityhelp.com/forums/topic/gravity-forms-and-white-lable-brandingdashboard-plugin#post-33798

    Posted 12 years ago on Monday August 29, 2011 | Permalink
  9. In case Scott does not check in here, you can contact him at his website:

    Scott Kingsley Clark
    http://scottkclark.com

    Posted 12 years ago on Tuesday August 30, 2011 | Permalink