Support

Home Forums Event Espresso Premium Conditional shortcodes in message templates?

Conditional shortcodes in message templates?

Posted: November 6, 2016 at 7:49 pm

Viewing 1 reply thread


richard sandilands

November 6, 2016 at 7:49 pm

I’m looking to output the value of a custom registration question into a message template.

I’m looking to insert the values of a “Billing Details” group of questions. The user would only answer these questions if the Billing Contact was different to the primary attendee.

So I would need to detect whether the various billing contact custom questions had values and if so, output them into the message template. If not, I’d default back to the Primary Registrant details.

Ideally EE would allow for a distinction between an attendee and the billing contact but I understand that the best workaround here is to use custom questions.


Tony

  • Support Staff

November 7, 2016 at 8:13 am

Hi there,

Currently its not possible to add conditionals within the message template, you would need to create your own custom shortcodes that checked the values before outputting anything to the template.

If you are comfortable with PHP if have posted an example of how to add custom shortcodes previously here:

https://gist.github.com/Pebblo/e87cc8e30c4848dcdfe2

If not you will need to contact a developer who can do this for you, we have a list of developers familiar with Event Espresso here:

https://eventespresso.com/developers/event-espresso-pros/

Viewing 1 reply thread

The support post ‘Conditional shortcodes in message templates?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso