Using custom field values in PDF tickets

  • Web Manager
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 2 months ago #108745 by Web Manager
Using custom field values in PDF tickets was created by Web Manager
On our event registration form, we have a selection menu where attendees select the company they work for from a pre-determined list.

I'd like to include the chosen companies logo on their PDF ticket.

The tickets (and messages) already allow a number of dynamic tags. Is there anyway to achieve something similar with custom field values?

Thanks

Andrew

Please Log in or Create an account to join the conversation.

  • Web Manager
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 2 months ago #108747 by Web Manager
Replied by Web Manager on topic Using custom field values in PDF tickets
I have tried the following code using the Organization field, where the value of the dropdown equals the file name of the image, which is pretty much what I needed but it didn't work:

<img src="images/tickets/[ORGANIZATION].png" alt="Ticket footer" width="425" height="85" />

Thanks

Andrew

Please Log in or Create an account to join the conversation.

  • Web Manager
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 2 months ago #108748 by Web Manager
Replied by Web Manager on topic Using custom field values in PDF tickets
OK, so I've got that working - to a point

I'm currently having to allow no spaces in the values of the List options so that the image file names match and therefore work.

What I need is the display value and the submitted value to be different but I can't seem to find a way to achieve this with the options given.

I would have thought that the Values and Default Values options would allow be to do this but I'm not having any luck.

Any tips greatly appreciated.

Thanks

Andrew

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #108765 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Using custom field values in PDF tickets
Hello Andrew

That tag will just be replaced with the value of the selected option, not the different value

If you want to use a different value, I am afraid of you will have to customize code to support a new tag like [ORGANIZATION_LOGO] or something like that. This should be base on the value of organization field

Try to look at components/com_eventbooking/helper/registration.php, method buildTags and try to customize it to meet your need

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc