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.

How can User Registration Add-On Create MULTIPLE Blogs?

  1. Hi guys!

    We're going to offer multiple plans in the Gravity Form user registration form, for example:
    - Plan A: 1 Blog
    - Plan B: 2 blogs
    - Plan C: 3 blogs

    We've already got GF User Reg add-on creating the login AND the initial blog for the user.

    But how can we have the same form prompt for - and create - multiple blogs for this user if he chooses that plan?

    I figure you could create fields "blog name #2" and "blog URL #2" - and conditionally display those only if Plan B is selected, right?

    But how can we have GF User Reg add-on create both of these blogs automatically upon submit?

    is it a matter of creating a second "User Registration Form" based on the same Gravity Form? Tried that, but once I have the first "User Registration Form" created, it won't let me created another one based on the same Gravity Form above, the drop-down is empty.

    SO looking to have both blogs created as part of the same initial registration process, not some after the fact upgrade thing. :-)



    Posted 11 years ago on Friday June 1, 2012 | Permalink
  2. David Peralty

    Can you explain more about how you've set up the creation of blogs within Gravity Forms User Registration Add-on?

    Posted 11 years ago on Friday June 1, 2012 | Permalink
  3. Hey David, sure.

    But just to take a quick step back - could you confirm that it IS possible for a Gravity Form with User Reg module to create multiple blogs for that newly created user. :-)

    i've got it working great creating the user and his ONE new blog in the multisite already.


    Posted 11 years ago on Friday June 1, 2012 | Permalink
  4. David Peralty

    I would like to say yes, but I've never created a blog in multisite with the User Registration add-on, so I can't say yes or no until I've looked at how you've done it.

    Posted 11 years ago on Friday June 1, 2012 | Permalink
  5. Hey David,

    Thanks for getting back to me, but I'm confused. Please feel free to correct me if I'm misunderstanding this, but it sounds like you're asking me to explain how the Gravity Forms User Reg module works, which was my question for the Gravity Forms team.

    Could you please forward this post to someone else on the RG team who is familiar with specifically how the User Reg module works and how to achieve the behavior I'm asking about, which is specifically creating blogs in multisite. :-)

    So to recap, my question is: what is the correct way to configure the Gravity Form with user reg module so that it can create Multiple Blogs, not just a single one.

    I've already got it configured to create a user and single blog, and that works with no problems.


    Posted 11 years ago on Sunday June 3, 2012 | Permalink
  6. Hi Dan,

    It is not possible out of the box; however, using the gform_user_registered hook you could create as many blogs for that user as you wanted manually.

    Since the created user ID and all submitted entry data is passed to this hook, it wouldn't be difficult to aggregate the required data from the entry and call the wpmu_create_blog function manually. Here is a small snippet of how the User Registration uses this function:

    // create the new site!
            $blog_id = wpmu_create_blog($site_data['domain'], $site_data['path'], $site_data['title'], $user_id , array( 'public' => 1 ), $current_site->id);
    Posted 11 years ago on Monday June 4, 2012 | Permalink
  7. @David Smith - thanks!!

    The catch i think would be that there would be no pre-site-create error message if the info provided for "2nd blog" fails... so the whole submission can fail.

    my point i guess is that this probably isn't viable unless "add multiple bogs" is supported officially as part of GF. :-)


    Posted 11 years ago on Monday June 4, 2012 | Permalink
  8. Gravity Forms and most of it's Add-ons are full of hooks and filters to allow almost any modification of functionality. You could add your own validation using the gform_validation filter.

    Posted 11 years ago on Monday June 4, 2012 | Permalink