- Issue created by @4kant
- 🇨🇦Canada endless_wander
I think you can hook into the registration form instead and add your own redirection callback. The $form_state class will have a setRedirectUrl() method you can use.
We have a calendar that lists free tennis courts (= events) for 30 minutes each. You can click on the links ("book") in the calendar and you will be taken directly to the event including the booking button for the respective half hour (I inserted the form into the display of the event instance using twig tweak)
The calendar has a date argument, e.g. the next day is displayed so that tennis courts can be booked for the next day (there is also a weekly view, etc.).
Most tennis players book 2 or more consecutive half hours, e.g. if they want to play doubles for 120 minutes.
My goal is for the tennis players to land back on the calendar after each individual half-hour booking - ideally directly at the event they have just booked.
I would solve this redirect using tokens that are inserted in the link within the calendar ("book").
Example:
<a id="{{ id }}" href="/events/{{ id }}?destination=/tenniscourts/[current_date:custom:Ymd]#{{ id }}">book</a>
Unfortunately, this link gets overwritten by this module.
It would be best if I could deactivate the function in the redirect settings so that my own link is used.
(I probably need to use different destination parameters for the different calendars (day/week))
An alternative solution would be if I could use tokens. In my case, global (current date) and eventinstance tokens would be used.
Active
2.0
Recurring Events Registration (Submodule)
I think you can hook into the registration form instead and add your own redirection callback. The $form_state class will have a setRedirectUrl() method you can use.