1

I would like to show the event timezone on the page that lists event details and the page that a registrant gets as confirmation after they register. Today my events are all in the same time zone but that will change in the future.

I can capture the time zone in a custom field but how do I get that custom field to show up

a) on event details pages

b) on registration confirmation pages

c) on event confirmation e-mails (I have read this page re confirmation e-mails which was very helpful, but I do not know how to access a custom field from within a smarty template)

Preferably the solution would not require changes that break upgrades.

Any ideas?

Thank you

1 Answer 1

1

a) This will happen automatically, assuming you want the "Event Info" page. In fact, it's far more common for folks to ask how to disable or style this. See my next answer for info on that.

b) will require programming knowledge. You can write a CiviCRM extension, or hire someone to do it. Use hook_civicrm_buildForm to look up the custom field, inject it into a PHP variable, and to load a template snippet to display it. Maybe also a little bit of jQuery or CSS to alter its appearance/location on the page.

c) depends on whether the custom field is already loaded into the template (I'm not sure). To check, insert {debug} into the template and send yourself a test message. If it IS there, great! Just copy/paste the token.

If it's not there, see this answer: How do I pass a variable to a smarty template?

2
  • Thanks Jon. This is super helpful! Just one question about part (a). Right now timezone is not shown at all on the event info page. Are you saying that if I create a custom field then it will be shown automatically on the event info page? Dec 20, 2016 at 18:14
  • That's correct @richardsplayground Dec 20, 2016 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.