Add a condition before sending the email

How to add a condition before sending an email in ChronoForms.

Overview

The issue arises when needing to check if an email is already registered in the database before sending an invitation.
Use a Custom Code action to perform the database check and store the result, then apply a condition to the Email action using the stored variable to control its execution.

Answered
pl plastic1st 19 Feb, 2014
Hello.

I'm using a Chronoform form on my website, which can be used by the members to send invitations to their friends to create an account on the website.
There's no problem with the form itself, which works perfectly (great job !!)
I just want to add a custom code before sending the message, in which I would check if the email is already registered into the database.

The code itself is really simple. My question concerns the way I can integrate my code to the form.
More precisely : is it possible to assign a condition on the "Email" action, depending on some variable content ?

My idea was to send my query in a "Custom code" step located just before the "Email" action, to store the result in a hidden input of my form, and then use this input content as a condition on the "Email" action.

Thanks in adcance for you advice/help.

plastic1st
Gr GreyHead 19 Feb, 2014
Hi plastic1st,

Please see this FAQ. This sounds like a case for my Email [GH] action.

Bob
This topic is locked and no more replies can be posted.