End cancellation date in front end event editing page

  • Silvia Cottino
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago #163832 by Silvia Cottino
On the event submission page from the frontend, I can modify all the dates except the cancellation end date. When I initially create the event, I set the cancellation end date to be the same as the registration end date. However, if I later modify the registration end date, the cancellation end date becomes different, causing issues. Is it possible to display the cancellation end date field or make it default to the same as the registration end date to prevent this discrepancy?

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

  • Tuan Pham Ngoc
  • Online
  • Administrator
  • Administrator
More
3 months 1 week ago #163844 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic End cancellation date in front end event editing page
Hi Silvia

What kind of submit event form layout you are using? I guess you are using simple layout, so that setting is not available and you would need to edit code to add that setting if it is really needed

Tuan

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

  • Silvia Cottino
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago #163852 by Silvia Cottino
Replied by Silvia Cottino on topic End cancellation date in front end event editing page
Thanks for the reply :)
Is there a layout that permits to edit that field? How can I change the layout?
If not, is there somewhere an example of the code I need to write to add this feature?

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

  • Tuan Pham Ngoc
  • Online
  • Administrator
  • Administrator
More
3 months 1 week ago #163880 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic End cancellation date in front end event editing page
Hi Silvia

Yes. You can try to edit the layout file components/com_eventbooking/themes/default/event/simple.php, add this blocks of code to the position you want:
Code:
<div class="<?php echo $controlGroupClass; ?>"> <div class="<?php echo $controlLabelClass; ?>"> <?php echo Text::_('EB_CANCEL_BEFORE_DATE'); ?> </div> <div class="<?php echo $controlsClass; ?>"> <?php echo HTMLHelper::_('calendar', $this->item->cancel_before_date, 'cancel_before_date', 'cancel_before_date', $this->datePickerFormat . ' %H:%M:%S', ['class' => 'input-medium']); ?> </div> </div>

Regards,

Tuan

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