Display Custom Fields

  • Olebaar
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 2 months ago - 14 years 2 months ago #5605 by Olebaar
Display Custom Fields was created by Olebaar
Hi,
I have searched this forum for answers for this problem but I haven't find any...

I cant't manage to find the database records for custom fields in MySQL

I want to give public acess to a list of entries via a spesific menu choice.
To find and look up regular fields like first_name, address etc in the tabell: t0r4j_eb_registrants - is no problem, but I have added some custom fields like: eb_class and eb_club
and I ain't able to look them up and display them.

Any Idea?

Regards
Ole B
Last edit: 14 years 2 months ago by Olebaar.

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

More
14 years 2 months ago #5606 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Display Custom Fields
Hi

The value for custom fields are stored in the table t0r4j_eb_field_values.

Hope this help .

Regards,

Tuan

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

  • Olebaar
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 2 months ago #5607 by Olebaar
Replied by Olebaar on topic Re: Display Custom Fields
Hi and thanks.
Display tools like GRID etc do not allow look up in mulitple database tabells. If these custom fields can't be located in the eb_registrants tabell, I must hard code this function. My hope was to avoid that :dry:

Rgds
Ole

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

More
14 years 2 months ago #5626 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Display Custom Fields
Hi Ole

The extension support unlimited custom fields, so we cannot add these fields to t0r4j_eb_registrants table. My suggestion is :

1. You create a helper function in helper.php file called getFieldValue($registrantId, $fieldName). The purpose of this function is getting the stored value of the $fieldName for $registrantId

2. In the GRID view, you can simple call :
Code:
echo EventBookingHelper::getFieldValue($registrantId, $fieldName)

Thanks ,

Tuan

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

  • Olebaar
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 2 months ago #5639 by Olebaar
Replied by Olebaar on topic Re: Display Custom Fields
HiTuan, you suggest a nice solution here - Thanks!

Regards
Ole

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

Moderators: Tuan Pham Ngoc