Skip Navigation

[Resolved] conditional registration and email notification

This thread is resolved. Here is a description of the problem and solution.

Problem:
conditional registration and email notification

Solution:
There is no such feature exists with Toolset forms but you can achieve this by using Toolset Forms hooks.

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/conditional-registration/#post-1202978

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by MatthewE391 5 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1202633

Hello there,
Is it possible for a cred user registration form to to only process the user registration based on a checkbox being tick. eg. The form will send an email notification if unchecked, but will create the user account if a checkbox was ticked?

Many thanks
Matt

#1202978

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - there is no such feature exists but I think you can achieve this by using Toolset Forms hook:

You can setup your notification as required using forms GUI :
=> https://toolset.com/documentation/user-guides/cred-user-forms-email-notifications/
OR
You can even use the hook to set customized email notifications:
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients

You can use the Toolset Form API hook cred_save_data
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

Using above hook - you should check if checkbox is not checked , then try to delete the created user using wp_delete_user() function.

More info:
=> https://codex.wordpress.org/Function_Reference/wp_delete_user
=> https://stackoverflow.com/questions/38420005/delete-user-programmatically-in-wordpress

#1205168

My issue is resolved now. Thank you!