× Form Help

Turn fields ON or OFF conditionally in emails

  • Erixsr
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0

Erixsr created the topic: Turn fields ON or OFF conditionally in emails

Hello everyone and sorry for my poor English. In the form that I have developed, the customer selects a yes / no radio group that allows the opening of a section. Eg "the shipping address is the same?". Everything is fine in the form. I'm finding problems in the email (custom) where I try to insert the conditional If, then. In the last tests this is the code:
<? Php
if (switch_sped: value) == 'off') {
     echo "the address is the same";
   } Else {
     echo "the shipping address is ... etc.";

I'm so wandering around the problem that I've become stupid. In the end it will be a smallness.
What am I doing wrong?
Thank you
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 3125
  • Karma: 104
  • Thank you received: 410

mihaela replied the topic: Turn fields ON or OFF conditionally in emails


Are you trying to create Custom email in form's Advanced Properties > More options > Admin/Mailback email? If that is the case there isn't a way to make the email look like you want there because it can't contain php coding.

The way to achieve what you want is to create custom email template as explained here crosstec.org/en/support/online-documenta...-name-and-email.html .

You would actually have to initialize a variable for every field in your dorm as explained here crosstec.org/en/forums/15-usage/124980-m...y-fields.html#230078 and then use the fields to create wanted email template.

Let me know whether this helped.


Moderators: ForumSupporttomeperica
Time to create page: 0.066 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here