Support

Home Forums Event Espresso Premium Message Shortcodes and Conditionals

Message Shortcodes and Conditionals

Posted: October 25, 2016 at 3:29 am

Viewing 1 reply thread


mautin

October 25, 2016 at 3:29 am

Hi,

in my invoice I am using a Shortcode [PRIMARY_REGISTRANT_ANSWER_*VAT] which works as is should and outputs e.g. “ATU6666506”

What I would need is a way to add additional text/html in front. But only if the
Field contains Data. e.g. “VAT: ATU6666506” and otherwise output nothing.

Best Michael

P.S. how can I adjust the size of the PDF from letter to A4 ?


Tony

  • Support Staff

October 25, 2016 at 4:53 am

Hi Michael,

Currently EE does not support conditionals within the shortcodes so that if the answer is empty nothing is output. For that you would need to create your own version of the shortcode and add the condition to that, then call your custom shortcode in place of the above.

I have previously posted details on adding custom shortcodes to the messages system here:

https://eventespresso.com/topic/venue-against-each-date/#post-177488

With some example code here:

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

P.S. how can I adjust the size of the PDF from letter to A4 ?

Its not currently possible to change the size of the PDF however you should still be able to print to A4.

Viewing 1 reply thread

The support post ‘Message Shortcodes and Conditionals’ 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