Booking — take appointments
The Booking component turns any page into an appointment scheduler. You set the availability rules — working days and hours, slot length, gaps, how much notice and how far ahead — and the widget shows visitors only the genuinely-free time slots. When someone books, the server re-checks the slot, prevents double-booking, records it, and can email a confirmation. It is completely self-contained — no third-party scheduling service.
Contents
- How it works
- The availability rules
- Where bookings are recorded
- Confirmations
- Double-booking & safety
- Every property
How it works
- The visitor picks a date. The widget asks the server for the free slots on that day.
- The server generates slots from your working hours and slot length, drops any that are in the past, inside the notice window, beyond the booking horizon, or already full, and returns the rest.
- The visitor picks a slot, fills in their details, and submits. The server re-validates the slot (right day/hours, still free) and books it — or asks them to pick another if it was just taken.
- The booking is saved and a confirmation is shown (and emailed, if enabled).
The availability rules
| Setting | What it does |
|---|---|
| Available days | Which weekdays accept bookings — a comma list like mon,tue,wed,thu,fri. |
| Day starts / ends | Working hours (24-hour HH:MM). The last slot ends by the closing time. |
| Slot length | Minutes per appointment (e.g. 30). |
| Gap between slots | A breather added after each slot (e.g. 10 minutes to reset between clients). |
| Bookings per slot | 1 = one appointment per slot (no double-booking). Increase it for group sessions or multiple staff. |
| Minimum notice | Hours of lead time — slots sooner than this are hidden (e.g. no bookings within 2 hours). |
| Book up to | How many days ahead visitors may book. |
Where bookings are recorded
Every booking is written to a pp_bookings table in your app's database — created automatically the first
time someone books (works on MySQL, MariaDB, PostgreSQL, SQLite and SQL Server). Each row has a unique reference, the
resource, the slot start/end, the booker's name/email/phone and any notes. Build a List page on pp_bookings
to see and manage your appointments.
Confirmations
- Email the booker a confirmation — sends the visitor their appointment details and reference.
- Notify email — the owner gets an email for every new booking.
Double-booking & safety
- No double-booking: a slot at capacity is never offered, and even under a race (two people submitting the same slot at once) a database constraint guarantees only one booking per seat succeeds.
- Server-authoritative: the availability rules live on the server — the browser only sends the component id and a chosen slot, so no one can book outside your hours or squeeze in an extra appointment.
- Optional CAPTCHA: switch on Require CAPTCHA to add a human check before a booking is accepted (handy for public pages).
Every property
| Property | What it does |
|---|---|
| Title / Subtitle / Resource | The heading, a short line, and who/what is being booked. |
| Availability | Days, hours, slot length, gap, and bookings-per-slot (see above). |
| Booking window | Minimum notice (hours) and how many days ahead. |
| Ask for phone | Add a phone field to the booking form. |
| Require CAPTCHA | Add a human-verification challenge before booking. |
| Email the booker / Notify email | Confirmation to the visitor and/or the owner. |
| Success message / Align | The confirmation text and the widget alignment. |