---
title: "rcp_after_register_form_fields"
source: "https://docs.nexcess.com/software/kadence/restrict-content-pro/rcp_after_register_form_fields/"
description: "Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experien…"
vertical: "Software"
area: "Restrict Content Pro"
date: "2023-04-20"
last_modified: "2026-08-12"
---

# rcp_after_register_form_fields

**Coming soon:** Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experience.

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(); ?>   Your field label\*

 echo ob_get_clean();
}

add_action( 'rcp_after_register_form_fields', 'ag_rcp_after_register_form_fields' );

/**
 * Validate form submission and add an error if checkbox isn't checked.
 * 
 * @param array $posted Array of information sent to the form.
 * 
 * @return void
 */
function ag_rcp_form_errors( $posted ) {
	if( ! isset( $posted['rcp_sample_required_field'] ) ) {
		rcp_errors()-add( ‘sample\_field\_required’, \_\_( ‘You must check this field’, ‘rcp’ ), ‘register’ ); } } add\_action( ‘rcp\_form\_errors’, ‘ag\_rcp\_form\_errors’ );
