I am using a toolset CRED form for creating a custom post and then I would like to send a different email to the email recepient based on their registration status.
If email is registered --> send notification A
If email is not registered --> send notification B
How can I do that?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
What if you try to use the Toolset Form's hook "cred_notification_event_type"
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_event_type
Where:
- The "cred_notification_event_type" hook is used to register or define the custom notification event type.
Hook "cred_custom_notification_event_type_condition"
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_custom_notification_event_type_condition
Where:
"cred_custom_notification_event_type_condition" hook is used during evaluation of a custom notification condition, when the event type is custom. It should be used in combination with the cred_notification_event_type hook.
Here is the related ticket that might help you:
- https://toolset.com/forums/topic/cred-form-notification-email-conditional-on-generic-field/#post-1158823
You can add your business logic and adjust the code added to the hook and check your custom field value.