• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Conditional User Emails base on form element value

Conditional User Emails base on form element value 7 years 9 months ago #37119

  • jeffhoneyager
  • jeffhoneyager's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Thank you received: 8
Scenario:

User completes a form. One element is a radio button to select the "topic" they are interested in... Let's say there are 3 options.

I would like to send them a nicely formatted response "User Email" where the content varies based on the option they select in the form.

Any ideas?

Thanks!
The administrator has disabled public write access.

Conditional User Emails base on form element value 7 years 9 months ago #37121

  • iceferret
  • iceferret's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 246
  • Thank you received: 64
use the {if}........... {/if}. So if value field 1 show this text etc. Works in emails and pdf. Search for {if} in emaill
If you can keep your head when all about you are losing theirs, then you obviously don't understand the situation!
The administrator has disabled public write access.

Conditional User Emails base on form element value 7 years 9 months ago #37124

  • jeffhoneyager
  • jeffhoneyager's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Thank you received: 8
Intriguing - but I'm not sure I understand. Can you give me an example?
The administrator has disabled public write access.

Conditional User Emails base on form element value 7 years 9 months ago #37125

  • iceferret
  • iceferret's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 246
  • Thank you received: 64
Ok, here's how I adjust an email when a club member pays their membership. They choose either Stripe or Paypal so I need a different content for the email depending on the option selected.

{if {Payment:value}==stripe}We have received confirmation of a card payment of {Total Amount:value} made by {Forename:value} {Surname:value} using:
Card: {stripe:card_brand}
Card No: : **** **** **** {stripe:card_last4}
Expiring: {stripe:card_exp_month}/{stripe:card_exp_year}{/if}

{if {Payment:value}!=stripe}You should receive confirmation of a Paypal payment of {Total Amount:value} from {Forename:value} {Surname:value} shortly{/if}

The first block translates as ...if option selected is (==) stripe then use this text.
The second block translates as ....if option is not (!=) stripe use this text.

In this case I only have two options hence the is/is not if you needed more then you would just use ==option1, ==option2, ==option3 etc. Here's the link to the RSJoomla explanation.

www.rsjoomla.com/support/documentation/r...t-php-knowledge.html
If you can keep your head when all about you are losing theirs, then you obviously don't understand the situation!
The administrator has disabled public write access.
The following user(s) said Thank You: jeffhoneyager, florent.tendil

Conditional User Emails base on form element value 7 years 9 months ago #37127

  • jeffhoneyager
  • jeffhoneyager's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Thank you received: 8
Perfect!

Thank you so much for sharing that snippet.

You just made a large group of people happy.

Peace & Joy,
Jeff
The administrator has disabled public write access.

Conditional User Emails base on form element value 7 years 9 months ago #37128

  • iceferret
  • iceferret's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 246
  • Thank you received: 64
Glad to help☺️
If you can keep your head when all about you are losing theirs, then you obviously don't understand the situation!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!