This entry is part 8 of 8 in the Customizing Restrict Content Pro Series
- Mail Chimp for Restrict Content Pro
- Add Custom User Meta Fields to Restrict Content Pro Registration
- Removing “Restrict This Content” Meta Box in Restrict Content Pro
- Restrict Content Pro – Campaign Monitor
- Restrict Content Pro – Graphs
- Restrict Content Pro – Stripe Payment Gateway
- Hide wp-login.php with Restrict Content Pro
- Add a Agree to Our Terms of Use Field to Restrict Content Pro
Restrict Content Pro, my plugin that allows you to easily run a premium subscription site with WordPress, has a very flexible registration form that is easy to add extra fields to. Want to add a field that stores extra information about the registering user? That’s easy! Want to add a new checkbox that users must check in order to agree to your terms of use? That’s also easy! In this tutorial, I’m going to demonstrate how to add the latter.
You must be logged in to view the rest of this content. Register or login from the sidebar.
Related Items

Awesome! I’ll have to integrate this to Blend Swap
Thanks! Is the plugin still working well?
We have a lot of delays on implementing it because not doing the promised tests, I will push Matt to do them today and will inform you if we run into any problems.
Take your time.
Dear I am trying for required field but its not working i cant see my error message and i can go to payment page with out DO1 Number. Below is my code
Please have look and let me know where is error
function pippin_add_do1_field(){
ob_start(); ?>
add(‘agree_to_do1′, __(‘You must have D.O.1 number’, ‘rcp’));
}
}
add_action(‘rcp_form_errors’, ‘pippin_rcp_check_for_do1′);
even i Used same code for agree to term use that you mentioned above. I can see agree to term check box at my page but if i dont check this box it does not show me error message same i dont get error message for my own fields.
here is my complete code for one field
http://snippi.com/s/xt63dtb
I’ve been getting a lot of reports on this. I think it’s a bug in the core plugin. I’m going to look into it and get a fix pushed out as soon as I can.
Hi Pippin,
were is my error in this code? I have insert your code for locations field (it’s ok) and agree terms (seems don’t work) in the same custom-function.php
http://snippi.com/s/183muce
Thanks in advance
Are you getting a syntax error or is the code just not seeming to work?
hi, thank for response. Not error, only don’t appear the button for Agree terms.
here the page
http://bit.ly/11zVoEd
Where did you put the custom-functions.php file? In wp-content/plugins?
wp-content/plugins/restrict-content/includes/custom-function.php
Sime,
Not quite what you need. You need to create an entirely separate plugin and then paste the code into that. Use this plugin to create a custom plugin: http://wordpress.org/extend/plugins/pluginception/
you have the class=”require” should be “required”
Just ran into this issue (custom errors not appearing or affecting validation).
What fixed it was adding the (supposedly optional) $data argument.
So:
rcp_errors()->add(‘sample_field_required’, __(‘You must check this field’, ‘rcp’));
Becomes:
rcp_errors()->add(‘sample_field_required’, __(‘You must check this field’, ‘rcp’), ‘register’);
Hi Pippin, not working!
I’ve download Pluginception, I’ve create a new plugin (I call it restric content 2), I’ve modified “Restric content pro” in the selector plugin, I’ve upload custom-function.php (http://snippi.com/s/183muce) in the new plugin. The path is wp-content/plugins/restric-content-2/custom-function.php
The page http://bit.ly/11zVoEd
Is that the complete plugin file?
see the photo of path http://bit.ly/Zd3ifG
I meant the complete contents of the file.