1

In the New Event Registration page, Event field gets all the events from very beginning. How can I configure to display only the upcoming events.

Registration Screen

2 Answers 2

1

Don't think there is a setting in the UI to do this. The event is basically added to the input widget using the getlist api of Event entity. Adding the following param to the same should be able to list only upcoming events in the input field.

'params' => array('start_date' => array('>' => "now")),

You should be able to do this via an extension. Or if you want to see the param buildup in core, it is present in Event/Form/Participant.php

Extending the above array to include our param should remove the past events.

$eventFieldParams['api']['params']['start_date'] = array('>' => "now");

Note that changes made to core would be lost after an upgrade, so it is better to override this file in an extension OR see if any hook can help you in attaining this.

1
  • It works. Thank you. For now I added this in Participant.php. Later will do the same via extension or hook. Thanks again.
    – Manigandan
    Feb 22, 2018 at 12:12
0

You can set the Event Is_active Flag to FALSE - you can find this in Event Configure Page

Is this Event Active?

So, the list will ignore any in-active event Events.

I guess this helps!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.