Forum

Thread tagged as: Events, Forms, Question

Using 'Events' app as a booking system

We have a client who is looking to have an online booking system on his site where people can select available dates from a calendar. They will effectively be booking consultation sessions.

The idea is that site users select a 'slot' on a calendar, click on the link, fill out the form, then he receives an email notification to confirm. This would obviously need managing from the back end so he can schedule accordingly (all covered here).

I am trying to retro-fit the Events app to serve this purpose, with the 'blank-day.html' template showing a 'Book a slot now >' link. This link then goes to a form above the calendar for the user to fill in. Any days with events have the info filled in with a 'Book a slot now>' link beneath for booking other sessions in the same day.

One thing I would like the link to do is automatically fill in the 'date' field in the form. I have been trying to use <perch:events id="selected_month" format="%b %Y" /> but whenever I put this in the 'blank-day.html' template, it shows nothing... Is there any way to get this across so it can carry the value to the form? I just don't understand why it will show in 'calendar.html' template but not 'blank-day.html'

Any advice would be helpful.

Alternatively, if you know of any online tools available which might suit, feel free to suggest and we can look into them.

Q2 Studio

Q2 Studio 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you checked the output of <perch:showall> to see what's available?

Hi Drew.

Thanks for the reply.

I have added the 'show all' tag to the 'blank_day.html' template in the calendar folder. This gives the following: -

  • perch_page_path
  • day
  • perch_namespace

Ideally, I would like the date info to be available when clicking the link so it can be used to populate a form field, just to save the user having to enter this themselves, see link to page below: -

https://dev.nonexecsquared.com/arrange-a-consultation.php - Try clicking on 'Book a slot' link on any available day.

Is there any way to achieve this...? Your help would be appreciated...

Kind regards,

Q2 Studio.

Drew McLellan

Drew McLellan 2638 points
Perch Support

As you only have the day there and not a full date, I think you'd need to write a template filter to handle it with some PHP.