rcp_after_register_form_fields

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/
Used to add extra form fields to the end of the registration form. Fields added here are displayed directly above the gateway selection.
Use rcp_form_errors to validate form fields.
Example:
This example shows adding a custom registration field (checkbox) and validation that sets an error if the checkbox isn’t checked (using rcp_form_errors).
/**
* Add checkbox to registration form.
*
* @return void
*/
function ag_rcp_after_register_form_fields() {
ob_start(); ?>


add( ‘sample_field_required’, __( ‘You must check this field’, ‘rcp’ ), ‘register’ );
}
}

add_action( ‘rcp_form_errors’, ‘ag_rcp_form_errors’ );

Have more questions?

Submit a request