The Multisite signup process is not an easy thing to tweak. It does have many hooks to play with, unlike other processes, but they don't seem to come together too well for heavy customization, so I understand your frustration.
If I understand correctly, it's not that complicated to achieve what you want, although it cannot be a one-step solution without overriding much of WordPress' default behavior, mainly because signup (i.e. when your user's will submit the custom information) and activation (i.e. when the new blog will actually be created) happen separately.
Here's a very rough code that you will need to get started. Hopefully it steers you in the right direction:
// Add text field on blog signup form
add_action('signup_blogform', 'add_extra_field_on_blog_signup');
function add_extra_field_on_blog_signup() { ?>
<label>An extra field</label>
<input type="text" name="extra_field" value="" />
<?php
}
// Append the submitted value of our custom input into the meta array that is stored while the user doesn't activate
add_filter('add_signup_meta', 'append_extra_field_as_meta');
function append_extra_field_as_meta($meta) {
if(isset($_REQUEST['extra_field'])) {
$meta['extra_field'] = $_REQUEST['extra_field'];
}
return $meta;
}
// When the new site is finally created (user has followed the activation link provided via e-mail), add a row to the options table with the value he submitted during signup
add_action('wpmu_new_blog', 'process_extra_field_on_blog_signup', 10, 6);
function process_extra_field_on_blog_signup($blog_id, $user_id, $domain, $path, $site_id, $meta) {
update_blog_option($blog_id, 'extra_field', $meta['extra_field']);
}
Keep in mind:
- If you want to filter the input via plug-in, I would strongly
suggest using a select input to lock down the options provided;
- Since some fields are required and pass through validation during
registration (minimum characters, disallowed characters for site
name, blacklisted names, etc), I would suggest checking for your
extra field on the $_REQUEST global when populating the value of the
input on the first function, so that the user doesn't lose his input in case he's sent back to fix the value of WordPress' default fields;
- You can obviously replace the last function's idea with
whatever suits your plug-in best, but the field's value will now be
available from within that last function, which should help you on
your way.
On a final note, if you want to process all the 'extra_field' values from all the existing blogs later on, I would strong suggest storing the information on a single table; maybe use update_site_option
instead of update_blog_option
on that last function, losing the blog_id, which is not required in that case.
Anyway, let us know how it goes, and good luck!