• 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: Confirmation emails PHP script

Confirmation emails PHP script 11 years 3 weeks ago #27222

  • SanderL
  • SanderL's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi there,

I'm wondering how I can manage the following: I have a Dropdown as choice to choose a certain 'Company'. If you choose your 'Company', I need to know through a second Dropdown which 'Location' of the company you're at.

I managed to hide the 'other' locations (which you don't choose) by adding
{if {locationX:value}} Don't show if value is empty {/if}
{if {locationY:value}} Don't show if value is empty {/if}
etc.

to the PHP Email Scripts.

But now, in the confirmation emails everything looks right. It doesn't show the empty value anymore.

Name location:
Name location:
Name location:
Name location: Forest
Name location:
Name location:
Name location:

But I want to loose the 'Name location' as well.

Hope someone can help me out. Of course, much appreciated!

dynamically-adjust-email-and-thank-you-message-content-without-php-knowledge
The administrator has disabled public write access.

Confirmation emails PHP script 11 years 3 weeks ago #27231

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

When using the IF pseudo-code, the text which you don't want to show can also contain placeholders. Example:

{if {field-name:value}} {field-name:caption} and this part doesn't show if my field has no value {/if}

Another example:

{if {field-name:value}} Name location: {field-name:value} {/if}

Anything you add in the middle area, which is between the curly brackets of the IF statement will not be shown if the field has no value.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Confirmation emails PHP script 11 years 3 weeks ago #27260

  • SanderL
  • SanderL's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi Adrian,

Innitialy I added the IF function to PHP email scripts.

I've managed to get it work by adding it to the users email, I placed the extra placeholders inbetween too.
Thanks for your help. Much appreciated.

Cheers,
Sander
Last Edit: 11 years 3 weeks ago by SanderL.
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!