[SOLVED] Submit Event Form - Agenda

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 10 months ago #125341 by ozwest
Submit Event Form - Agenda was created by ozwest
I was wondering if I could create an override of the plugin that is used for displaying the TAB Agenda in the event submission form. I would like to add a comment there.

Thank you

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

More
4 years 10 months ago #125342 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Submit Event Form - Agenda
Hello

Unfortunately, it's not possible to override that tab to display more fields. The reason is because. If you want to add more field (comment field), you will need to:

1. Add a field to #__eb_agendas table to store value of that field

2. Modify code in plugins/eventbooking/agendas/form/agenda.xml to add that field to form (it's defined via XML)

3. Modify plugins/eventbooking/agendas/agendas.php, method onAfterSaveEvent to store data of that field

4. Modify components/com_eventbooking/themes/default/plugins/agendas.php to display that new field in the position you want

Please let us know if that's OK to you

Regards,

Tuan

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

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 10 months ago #125348 by ozwest
Replied by ozwest on topic Submit Event Form - Agenda
Hello Tuan

I am talking to a real PRO here. Thank you for your answer.

My question was actually much simpler and maybe I did not express myself properly. So I try again:

I would like to modify the agenda.php plugin, not to all a field but simply add a comment such as:

Here you can add the agenda of your event e.g. 9:00 Registration, 11:00 Morning Tea, 13:00 Lunch etc.

So I only want to add a <div>comment</div> just before the agenda form.

I can do this and it works with the plugin but I wanted to move the plugin to the HTML override, so that the next update will not make this unhappen.

Where do I have to copy agenda.php to?

Thank you Tuan

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

More
4 years 10 months ago #125353 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Submit Event Form - Agenda
Ah, I thought you need to add comment to each agendas item, store it into database, and then show it

In your case, it's simple and I just updated Events Booking code base to make it possible for you to implement the modification using override

You can access to My Downloads menu item, download latest package to your site. Then modify components/com_eventbooking/themes/default/plugins/agendas_form.php to have the result you need

After that, upload the modified file to PATH_TO_TEMPLATE/html/com_eventbooking/plugins 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.

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 10 months ago #125357 by ozwest
Replied by ozwest on topic [SOLVED] Submit Event Form - Agenda
Thank you Tuan, it worked and here is how it looks now:

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

More
4 years 10 months ago #125359 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic [SOLVED] Submit Event Form - Agenda
Great. It looks good

Tuan

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