bookmark_bordergform_user_registration_add_option_section

Description

Used to add a custom option section to the User Registration Feed (similar to how BuddyPress and MultiSite are integrated with the User Registration add-on).

Removed: This hook was removed in version 3.0 and replaced by gform_userregistration_feed_settings_fields.

Usage

Applies to all forms

add_action( 'gform_user_registration_add_option_section', 'your_function_name', 10, 3 );

Parameters

  • $config array

    The User Registration configuration array.

  • $form

    The Form Object for which the current user registration feed is for.

  • $is_validation_error boolean

    Boolean value indicating whether there was a validation error with the User Registration configuration.

Examples

This example is a bit of modified code from the User Registration source code that demonstrates how the Multi-Site section was added to the feed page.

add_action( ‘gform_user_registration_add_option_section’, ‘add_multisite_section’, 10, 3 );
function add_multisite_section( $config, $form, $is_validation_error ) {

get_current_site();

$form_fields = self::get_form_fields($form);
$multisite_options = $config[‘meta’][‘multisite_options’];
$parent_blog = get_dashboard_blog();
$current_blog = $GLOBALS[‘blog_id’];

if($parent_blog->blog_id != $current_blog)
return;

?>

Multisite Options


onclick=”if(this.checked){jQuery(‘#multisite_option_items’).fadeIn(‘fast’);} else{jQuery(‘#multisite_option_items’).fadeOut(‘fast’);}” />

“>

(required)

Source Code

This action hook is located in userregistration.php