How to show custom fields in registration history?

More
5 years 3 weeks ago #123886 by Luigi
I am using Event Booking version 3.9.0

I would like to display 3 custom fields on index.php?option=com_eventbooking&view=history so they can see the custom views

In index.php?option=com_eventbooking&view=fields I have the following 3 fields (See screenshot).

https://ibb.co/c3tRnPW
Looks like I can't embed? imgur.com/a/Fqqh0jR#TmQvPp4

I tried editing this file -> /themes/default/history/default.php
I edited this: <?php echo $row->weight ; ?> but it did not display anything.

Also: Is there a difference in displaying list or regular text?

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

More
5 years 3 weeks ago #123887 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to show custom fields in registration history?
Hi Luigi

Before we provide support for your questions, please submit a support ticket letting us know the email you used to purchase our extension or the email you used to purchase the product. We will need to verify your order before providing support

Sorry for asking the question. I ask this because I don't see any order associated to your account

Tuan

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

More
5 years 3 weeks ago #123890 by Luigi
Ticket submitted.

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

More
5 years 3 weeks ago #123891 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to show custom fields in registration history?
Thanks. So at the moment, we don't support show additional custom fields on registration history

If you want to show it, you will have to write code to query the data to display. Below is sample code (for field with ID = 100)
Code:
$db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('field_value') ->from('#__eb_field_values') ->where('registrant_id = ' . $row->id) ->where('field_id = 100'); $db->setQuery($query); echo $db->loadResult();

Use that code for any fields you want, just replace 100 with ID of that field

Regards,

Tuan

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

More
5 years 3 weeks ago #123892 by Luigi
Thank you for the quick reply!
Going to try it later today. Will update.

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

More
5 years 3 weeks ago #123893 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to show custom fields in registration history?
Once the modification is done, please move the modified file to PATH_TO_TEMPLATE/html/com_eventbooking/history folder so that the change won't be lost when you update to future releases of the extension

Regards,

Tuan

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

More
5 years 2 weeks ago #124074 by Luigi
Working perfectly. Thank you!

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

More
5 years 2 weeks ago #124080 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to show custom fields in registration history?
Great. Happy to hear that and thanks for confirming

Tuan

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

Moderators: Tuan Pham Ngoc