sql custom field - display linked data in listings

  • cpaschen
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 month ago #122687 by cpaschen
I have several custom fields that I need to add to our events where the data is pulled from other components.
The custom component area works fine with a field type of sql.

However, when the event is displayed on the event details page, the field just shows the "id" of the entries chosen - not the text of the selection.

Is a configuration needed to ensure that the proper related text is displayed in listings?
Or is there a way that I need to manually override these lists (in a way that won't be broken by updates of EB)?

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

More
7 years 1 month ago #122715 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic sql custom field - display linked data in listings
Hello

It's because the SQL query which you are having return id of the entry for value of the generated dropdown, not the text.

So you can change the query, use text of the entry for value and it should be fine

If you want to customize the code which display that part, look at components/com_eventbooking/themes/default/common/event_properties.php and perform the customization

You can move the modified file to PATH_TO_TEMPLATE/html/com_eventbooking/common 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.

Moderators: Tuan Pham Ngoc