Add second terms checkbox

In the Register form where there is a Tick box and it says I agree to the Terms and conditions with hyperlink. How can I add another small sentence in continuation to read “I have the consent of our Son/Daughters to disclose their personal details”.
Better if it can be another tick box or can be in continuity

Thanks Hope this can be resolved easily without hiring a webdeveloper or Fiverr

Hi,

If I understand you correctly, please check the solution in this topic: Add a second "Terms and Conditions" checkbox on booking form - #2

​I hope this is helpful to you.

Thanks as suggested,


I attach a screenshot. This shows a second tick box of consent below the default tick box. How can I achieve this?
The link to the page is Register Form

Hello @goyals,

Here’s a PHP code that you might find useful (there are three codes to add 3 checkboxes) :

//Box 1 - Required
add_filter(
	'hivepress/v1/forms/user_register',
	function( $form ) {
		  $form['fields']['custom_message_terms_policy'] = [
			'caption' => 'Custom text',
			'type'      => 'checkbox',
			'required' => true,
			'_external' => true,
			'_order'    => 1000,
		];

		return $form;
	},
	1000
);

//Box 2 - Required
add_filter(
	'hivepress/v1/forms/user_register',
	function( $form ) {
//For "Customtext" below, use the same words as in "caption" but without the spaces between the words. If you write "lorem ipsum dolor sit amet", you should write "loremipsumdolorsitamet".
		$form['fields']['customtext'] = [
			'caption' => 'Custom text.', 
			'type'    => 'checkbox',
			'required' => true,			
			'_order'  => 123,
		];

		return $form;
	},
  1000
);

//Box 3 - Required
add_action(
	'hivepress/v1/models/user/register',
	function( $user_id, $values ) {
		if(isset($values['_terms'])){
			update_user_meta($user_id, 'hp_registration_terms_accepted', true);
		}
		
		if(isset($values['custom_message_terms_policy'])){
			update_user_meta($user_id, 'hp_registration_policy_accepted', true);
		}
		
	},
	10, 
	2
);

Here is a PHP code that you can implement with Code Snippets – WordPress plugin | WordPress.org

See the tutorial : How to add custom code snippets - HivePress Help Center

This PHP code is based on the following code : Add a custom checkbox to the user registration form - Gist.github.com

This code allows you to have three obligatory boxes for the user. If you don’t want the checkbox to be required, you can delete : ‘required’ => true,

You can also add a URL in “Custom text” with :

'caption' => 'Custom text <a href="https://www.your custom url" target="_blank">Custom text</a>',

You can find another similar discussion here : Force new users to accept terms AND privacy policy? - General - HivePress Community

I hope you find it useful.

1 Like

Hi Valentin
Wonderful response from you. The snippet worked like a charm and I added only one tick box though you have kindly send me the option of another 2…
Can I ask if I wish people to upload their ID document (in future) can this be also added, so that we can then verify the listing and its owner? Will it be similar to what you have mentioned? Will it be straightforward and not difficult a code to add? Not sure if I can also ask this as a favour from you, as my site is now almost done with your great software. Thank you.
Secondly, once registration form is submitted it shows a popup message “Please check you email to activate your account” where and how can I add few words like “including your SPAM folder”?

Thanks

Hi @goyals,

Thank you for your message.

:arrow_right: Request 1 :

Unfortunately, I can’t give you an answer to this request. I think that custom code is needed to achieve this. PHP code won’t be enough.

However, here are some similar discussion topics that may help you in your approach :
:thought_balloon: Add a file attachment field in the user registration form - General - HivePress Community
:thought_balloon: Add custom fields to the user registration form - Feature Requests - HivePress Community
:thought_balloon: Add ID attachment field to registration for user verification - General - HivePress Community
:thought_balloon: Adding attachment fields to the registration form - Development - HivePress Community
:thought_balloon: How can i add custom fields to the user registration form - General - HivePress Community
:thought_balloon: Include attachment URL in another attribute’s description - General - HivePress Community

:arrow_right: Request 2 :

For this query, you can use Loco Translate to modify your text.

See the tutorial : How to translate a theme - HivePress Help Center

I hope this helps you.

I would like to hide the default description box to show in the edit listing page OR want to make it manual approval needed if any changes are made.

How can I achieve this, may be hiding the box be better option (if you can advise how to achieve this) as I can then add a next text area box to replace this hidden box with moderation needed pending approval ticked.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.