Email form plugin with PHP condition

georgie

Member
Hi!

I want to send an email after submitting a form (Email form plugin), but according to a condition.
Type : if this field has such value, then sends the email, otherwise not.

But I do not write the php code correctly. I tried several syntaxes, such as :

{$data-> field} == "Value"

or

{table___field} = "Value"

But without success...

Can you help me?

Fabrik thank you again !!!
 
I've just installed fabrik a couple of days ago and had a play around with this and it does work. I strongly advise reading Fabrik wiki as it contains lots of info about email and placeholders.

What you have to do is follow the placeholders structure and use that method, which is {tablename___elementname} It typically consists of a tablename, follwed by THREE underscores, followed by an element name, all surrounded by curly brackeets.

You have to create a file with .html (dot html). For example "useremailtemplate.html". and place this in the following folder (use FTP) "/plugins/fabrik_form/email/tmpl/ and then go back to your forms and select the name of your newly created file from the dropdown list.

Hope that helps.
 
Thank you but it is not about the template, emails sending runs correctly, but I want a condition before sending email, condition about the input value in a certain field.

I think I have found solution in documentation, with this syntaxes :

return'{tablename___elementname}'==1;

Fabrik!!!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top