Action uncanny-learndash-groups

ulgm_groups_registration_form_after_terms

Fires after the terms and conditions field on the group registration form, allowing customization.

add_action( 'ulgm_groups_registration_form_after_terms', $callback, 10, 1 );

Description

Fires after the terms and conditions checkbox on the user registration form. Developers can use this hook to add custom fields, messages, or modify the layout of the registration form following the terms acceptance section.


Usage

add_action( 'ulgm_groups_registration_form_after_terms', 'your_function_name', 10, 1 );

Examples

<?php
/**
 * Example function to add extra information after the terms and conditions checkbox
 * in the Ultimate Groups registration form.
 *
 * This function demonstrates how to hook into 'ulgm_groups_registration_form_after_terms'
 * to inject custom content or functionality.
 *
 * @since 1.0.0
 */
function my_custom_terms_extra_info() {
    // Display a link to a separate page with detailed terms and conditions.
    // You could also add additional helper text or a disclaimer here.
    ?>
    <p style="font-size: 0.9em; color: #666;">
        By checking this box, you agree to our <a href="/terms-and-conditions/" target="_blank" rel="noopener noreferrer">full Terms and Conditions</a>.
    </p>
    <?php
}
// Add the action hook with the custom function.
// We assume this hook doesn't pass any arguments, so we use 0 for accepted_args.
add_action( 'ulgm_groups_registration_form_after_terms', 'my_custom_terms_extra_info', 10, 0 );

Placement

This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.


Source Code

src/includes/forms/user-registration-form.php:142

class="required"
								   value="<?php if ( ulgm_filter_has_var( 'ulgm_terms_conditions', INPUT_POST ) ) {
									   echo sanitize_email( ulgm_filter_input( 'ulgm_terms_conditions', INPUT_POST ) );
								   } ?>"
								   type="checkbox"/><?php echo SharedVariables::ulgm_term_condition(); ?>
						</td>
					</tr>
					<?php do_action( 'ulgm_groups_registration_form_after_terms' ); ?>
				<?php } ?>
				<!-- Terms __ END -->
				<?php do_action( 'ulgm_groups_registration_form_before_buttons' ); ?>
				<!-- Buttons __ START -->
				<tr>
					<td class="input">
						<input type="submit" class="btn btn-default"


Scroll to Top