Forums

sent mail

Pkoll 07 Nov, 2024

Hi Max

In the view of my form I have defined a field within a user can indicate wether he wants to receive a mail Yes of No. 

Is there a way in CF 8 tin de submit area to check  to send a mail or not. There is no trigger or event in a mailobject.

So how can I do that?

greetings 

Paul

Max_admin 07 Nov, 2024
Answer

Hi Paul

v8 does not have a Run Conditions behavior like v7 yet, so the way to do this now is using PHP action with Events behavior, you need to return the field value and add 2 events Yes & No to match the returned values (or Yes only for simplicity) and drag your Email action there

return $this->data("field_name"); // this will return either Yes or No
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Pkoll 09 Nov, 2024

Thanks Max

It works

Paul

Max_admin 09 Nov, 2024

No problem, I have also added a Run Conditions behavior to the new update

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.