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.

Add Form to Admin Section

  1. babsmiles
    Member

    I have pretty much no programming experience but I'm trying :) So I wanted to add a form for users to fill out in the admin section vs. on the front page. I was trying this little code but its not working. I got form id 1 to show up, but it was trying to make it an editable form. I want this to be the final form that shows up. Is this possible?

    This is something I made for the functions.php file in the theme.

    function jobform_add_pages() {
        add_menu_page('admin-menu', 'Post A Job', 5, __FILE__, 'jobform_toplevel_page');
    }
    function jobform_toplevel_page() {
          gravity_form(4, false, false, false, '', false);
    }
    add_action('admin_menu', 'jobform_add_pages');
    Posted 12 years ago on Saturday October 29, 2011 | Permalink
  2. Gravity Forms forms are not designed to be used in the admin section of WordPress, but you can certainly try it and let us know how it goes. Here is a similar question asked by another user:
    http://www.gravityhelp.com/forums/topic/form-in-admin#post-7597

    Posted 12 years ago on Sunday October 30, 2011 | Permalink
  3. babsmiles
    Member

    Thanks for the response. I did some experimenting and I think if I was a better programmer I could do it but I think I have a better solution of just making a mini admin section and keeping the real admin section hidden. So I'm going to try that route.

    Posted 12 years ago on Sunday October 30, 2011 | Permalink
  4. OK, let us know if you get stuck.

    The Gravity Forms are specifically designed to NOT enqueue the scripts and styles in the admin, so making it work there would require you to jump through some hoops.

    You can create a simple page template, protect it with a log in, then drop the Gravity Form in there. It would not look like the full back end of wp-admin, but it does not have to look like the front end of your site either.

    Posted 12 years ago on Monday October 31, 2011 | Permalink