PPPHP

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.

Where to find it. In the Designer, open the components palette (the Sections group) and drag Booking onto a page. Set the availability in the inspector and rebuild. Each Booking block is its own independent schedule — add several for different people, rooms or services.

Contents

How it works

  1. The visitor picks a date. The widget asks the server for the free slots on that day.
  2. 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.
  3. 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.
  4. The booking is saved and a confirmation is shown (and emailed, if enabled).

The availability rules

SettingWhat it does
Available daysWhich weekdays accept bookings — a comma list like mon,tue,wed,thu,fri.
Day starts / endsWorking hours (24-hour HH:MM). The last slot ends by the closing time.
Slot lengthMinutes per appointment (e.g. 30).
Gap between slotsA breather added after each slot (e.g. 10 minutes to reset between clients).
Bookings per slot1 = one appointment per slot (no double-booking). Increase it for group sessions or multiple staff.
Minimum noticeHours of lead time — slots sooner than this are hidden (e.g. no bookings within 2 hours).
Book up toHow many days ahead visitors may book.
All times use the app's timezone (Misc → Advanced → Timezone). Set it correctly so slots and the notice window line up with your real working hours.

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

Confirmation emails need email configured for the app (Misc → Email). If email isn't set up, the booking is still recorded and shown on screen — it just won't send a message.

Double-booking & safety

Every property

PropertyWhat it does
Title / Subtitle / ResourceThe heading, a short line, and who/what is being booked.
AvailabilityDays, hours, slot length, gap, and bookings-per-slot (see above).
Booking windowMinimum notice (hours) and how many days ahead.
Ask for phoneAdd a phone field to the booking form.
Require CAPTCHAAdd a human-verification challenge before booking.
Email the booker / Notify emailConfirmation to the visitor and/or the owner.
Success message / AlignThe confirmation text and the widget alignment.