Slot booking in WordPress
An appointment form: reason, day with the native date picker, morning and afternoon slots as radio buttons, full slots crossed out and a summary of the choice.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<!-- wp:html -->
<form class="slots" action="#rendez-vous-confirme" data-slots novalidate>
<div class="slots__side">
<h2 class="slots__title">Prendre rendez-vous</h2>
<p class="slots__intro">Clinique vétérinaire des Tilleuls, 8 place du Marché à Angers. Urgences : <span class="slots__nowrap">02 41 00 00 00</span>.</p>
<div class="slots__field">
<label class="slots__label" for="slots-reason">Motif</label>
<select class="slots__control" id="slots-reason" name="motif">
<option value="consultation">Consultation (30 min)</option>
<option value="vaccin">Vaccination (15 min)</option>
<option value="senior">Bilan senior (45 min)</option>
</select><?php
/**
* Plugin Name: Forge, Réservation de créneaux
* Description: Un formulaire de prise de rendez-vous : motif, jour avec le sélecteur de date natif, créneaux du matin et de l'après-midi en boutons radio, créneaux complets barrés et résumé du choix. Ajoute la composition « Réservation de créneaux » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-reservation-creneaux
*(() => {
if (!document.querySelector(".slots")) return;
document.querySelectorAll("[data-slots]").forEach((form) => {
const date = form.elements.date;
const groups = form.querySelector("[data-slot-groups]");
const closed = form.querySelector("[data-closed]");
const summary = form.querySelector("[data-summary]");
const error = form.querySelector("[data-slot-error]");
const radios = [...form.querySelectorAll('[name="creneau"]')];
const long = new Intl.DateTimeFormat("fr-FR", { weekday: "long", day: "numeric", month: "long" });
const pad = (n) => String(n).padStart(2, "0");
const iso = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;:root {
--slots-text: #0f2a17;
--slots-muted: #3f5a47;
--slots-card: #ffffff;
--slots-field: #ffffff;
--slots-line: #d4e9da;
--slots-border: #a3cdb0;
--slots-soft: #f0fdf4;
--slots-accent: #166534;
--slots-accent-hover: #14532d;
--slots-accent-text: #ffffff;
--slots-full: #5f7a66;Free component: copy it freely, including for commercial projects.
Other forms and inputs components in WordPress
Forms and inputs components in WordPress
A quote request form for tradespeople: the customer describes the work, picks a start date range and attaches up to six site photos, each with a preview, its size and a button to remove it.
- Tailwind
- React
- CSS
- WordPress

A quote request form whose labels, hints and error messages are full French sentences, still readable at 320 px: nothing overflows, nothing is cut off, and each error is tied to its field.
- Tailwind
- React
- CSS
- WordPress

Visitors pick a package and tick options: the pre-tax total, VAT and total including tax update live, and the summary is sent with the contact form.
- Tailwind
- React
- CSS
- WordPress

A short NPS survey: a 0 to 10 score as radio buttons, then a follow-up question adapted to whether the customer is a detractor, passive or promoter.
- Tailwind
- React
- CSS
- WordPress

An honest unsubscribe page: address prefilled from the link, choice between stopping everything or receiving less, optional reason and an undo.
- Tailwind
- React
- CSS
- WordPress

A callback request form: French phone number checked and formatted, topic, working day and time slot, with explicit consent to the call.
- Tailwind
- React
- CSS
- WordPress