Hiding Custom Fields on Event Detail

  • Annamarie Hessman
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 9 months ago - 5 years 9 months ago #135122 by Annamarie Hessman
Hiding Custom Fields on Event Detail was created by Annamarie Hessman
I implemented a number of custom fields for use with virtual meetings -- Meeting LInk, Meeting Id, Meeting Password and Call-in Information. These are for use in the email that goes out to registrants and, should I have the programming time, to be included in the ICS file.

What is happening is this information, which was supposed to be secured, is being displayed on the Event Detail page under "Event Details."

How can I prevent this from happening?

EDIT: It looks like I need to modify the "display in" setting for these fields, but I'm confused about the syntax that will be needed. I have tried adding a parameter to the field as follows, but none of these seem to hide it from the Event Detail form:

display in="Both Individual and Group Registration Billing Form" (generates a syntax error, no surprise there)
displayin="Both Individual and Group Registration Billing Form"
display="Both Individual and Group Registration Billing Form"
displayin="Both Individual and Group Billing Form"

Please help! I just want these fields to be available to the user email and ICS, not the forms, anyway!
Last edit: 5 years 9 months ago by Annamarie Hessman.

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

More
5 years 9 months ago #135127 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding Custom Fields on Event Detail
Hello

We do not have an option to allow hiding the custom fields on event details page. If you want to hide it, you will need to edit code in the file components/com_eventbooking/themes/default/common/event_properties.php to remove the fields from being displayed. The code which you should remove it:
Code:
if (isset($item->paramData)) { foreach ($item->paramData as $param) { if ($param['value']) { $paramValue = $param['value']; // Make the link click-able if (filter_var($paramValue, FILTER_VALIDATE_URL)) { $paramValue = '<a href="' . $paramValue . '" target="_blank">' . $paramValue . '<a/>'; } ?> <tr class="eb-event-property"> <td class="eb-event-property-label"> <?php echo JText::_($param['title']); ?> </td> <td class="eb-event-property-value"> <?php echo JText::_($paramValue); ?> </td> </tr> <?php } } }

Once the modification is done, please 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
The following user(s) said Thank You: Livius Chebeleu

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

  • Annamarie Hessman
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 9 months ago #135153 by Annamarie Hessman
Replied by Annamarie Hessman on topic Hiding Custom Fields on Event Detail
Sorry, it's not clear to me where in the code I identify the custom fields I want to hide.

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

More
5 years 9 months ago - 5 years 9 months ago #135156 by Livius Chebeleu
Replied by Livius Chebeleu on topic Hiding Custom Fields on Event Detail
Annamarie,

If I'm not mistaken, this will not render any of the custom fields on the Extra Information tab in the Event Details section on the front end. It's all or none.

Tuan,

Just to confirm, does removing the code prevent the fields from rendering the field data so if someone were to inspect the details page they would not see the hidden data and therefore be secure?

Regards/Livius
Last edit: 5 years 9 months ago by Livius Chebeleu.
The following user(s) said Thank You: Annamarie Hessman

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

More
5 years 9 months ago #135172 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding Custom Fields on Event Detail
Hello

I implemented some code to make it easier to hide event custom fields you want on event details page. Please:

- Access to My Downloads menu item, download latest package of Events Booking, upgrade to your site.

- Then go to Events Booking -> Configuration, look at Event Custom Fields tab, change the field you want to hide, add show="false" or show="0" to it and it will be hidden

For example, with the above code:
Code:
<?xml version="1.0" encoding="UTF-8"?> <config> <fields name="params"> <fieldset name="basic"> <field name="field_speaker" type="text" label="Speaker" size="50" show="false" description=""></field> <field name="field_hours" type="text" label="Number Hours" size="50" description=""></field> </fieldset> </fields> </config>

The field field_speaker will be hidden on event details page

Please do that and let us know if you need more help

Tuan

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

  • Annamarie Hessman
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 9 months ago #135179 by Annamarie Hessman
Replied by Annamarie Hessman on topic Hiding Custom Fields on Event Detail
Thank you, this has addressed the issue!

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

More
5 years 9 months ago #135181 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding Custom Fields on Event Detail
Great. Thanks for confirming

Tuan

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

More
5 years 9 months ago #135186 by Livius Chebeleu
Replied by Livius Chebeleu on topic Hiding Custom Fields on Event Detail
Will this be available if I go to my downloads as well? Thanks/Livius

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

More
5 years 9 months ago #135191 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding Custom Fields on Event Detail
Yes. It's available to everyone. Just access to My Downloads menu item, download latest package, upgrade it to your site to use this option

Tuan
The following user(s) said Thank You: Livius Chebeleu

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

More
5 years 9 months ago #135198 by Livius Chebeleu
Replied by Livius Chebeleu on topic Hiding Custom Fields on Event Detail
Is there a syntax for adding comments to Configuration/Custom Fields tab?

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

Moderators: Tuan Pham Ngoc