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.

BuddyPress multisite front end post creation

  1. Can Gravity Forms be used in a BuddyPress / multisite set up for front end post creation?

    We have two scenarios that we'd like to implement:

    1. We want a user to be able to create a simple post, which gets posted to the user's blog, and fires a message to the site admin (or other nominated user) to let them know a post has been made. Essentially, this will be the user asking a question, and then corresponding with the admin via the comments on the post.

    2. We want to allow the users to submit articles (with file attachments). In this case, we'd want the user id to be captured in their form submission

    Thanks in advance

    Posted 13 years ago on Saturday August 14, 2010 | Permalink
  2. I'm not sure how #1 would work. Posts are created within the blog that the form is embedded on and from. This is tricky with BuddyPress because of how users setup their own blogs so i'm not sure having the form on the main BuddyPress site will be able to post to a users blog as each blog is a separate instance of WordPress from database perspective.

    If a user is logged in when submitting a form, you can set it to use that user as the author of the post.

    Posted 13 years ago on Monday August 16, 2010 | Permalink
  3. freqman24
    Member

    I can get this to work with only allowing the secondary site admin to see the post form by putting the template function checking first if user is logged in and is owner of the site and posting as the author. So we're all good on getting this to post on user sites as a frontend post form but...

    How could I auto create a default form for secondary sites that is for superadmin only? That is, use one template form that will be active on the theme upon creating a new blog but not have the site admin be able to access the form options. As it is, from what I can see the user will need to activate the plugin, create a new form, etc. and we don't want the user to access GF's options at all.

    I have users blog working off the same theme with the template function in the index.php. So when the user activates their blog, it will show the undefined function error because they haven't gone through activating the GF. And when the plugin is activated, the template could not be located.

    How could we do this creatively to auto create a default form template on all new blogs created and have the plugin active upon blog creation. Could we possibly work it in to the Multisite plugin New Blog Defaults as an add-on? Maybe a way to locate the template via an include wp_content_dir. Maybe another option is to auto export the main site forms into the plugin dir where they could then be automatically imported to the secondary sites.

    Any other ideas to get this going? If there were a way to manage/create all forms on the main site and network activate them across all sites, that would be key!

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink
  4. There is currently no way to limit form admin access to just superadmins without using some sort of role management plugin. Even then the Gravity Forms role management integration is only applied to main areas (ex. edit forms, view entries, edit entries, etc.) and doesn't get as granular as limit access to a specific form.

    You can auto-create forms in WordPress 3.0 Multi-site by adding a line of code to your wp-config.php file that points to a form export file. So you would create your default forms and then use the export tool to export them to an XML file, place it on your server, and then add a line of code to your wp-config.php file that points to this file and those forms will be created automatically.

    You can also auto-populate the license key using another line of code in the wp-config.php file.

    The form auto-creation is discussed and the line of code you need to add can be found in the blog post announcing version 1.4:

    http://www.gravityhelp.com/gravity-forms-v1-4-released/

    The license key auto-population is discussed in the 1.3.13 version release announcement:

    http://www.gravityhelp.com/gravity-forms-1-3-13-released/

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink
  5. freqman24
    Member

    perfect thanks! I can try a few things now to "hide" the gf options for blogowners and leave only viewable to superadmin, or just hide them all together...especially if the forms are for auto published posts for loggedin/can-edit users - they wouldn't need to see the entries, or edit screens for gf anyway.

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink