Click and collect order form in WordPress
An order form for in-store pickup: quantity per item, pickup day and time slot (full slots blocked) and a live total.
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
<?php
/**
* Plugin Name: Forge, Commande en click and collect
* Description: Un formulaire de commande à retirer en boutique : quantités par article, jour et créneau de retrait (créneaux complets bloqués) et total en direct. Ajoute la composition « Commande en click and collect » à 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-formulaire-commande-click-collect
*<!-- wp:html -->
<form class="fcc" data-fcc data-fcc-full="{"samedi":["9h"],"dimanche":["7h","11h"]}" novalidate aria-labelledby="fcc-titre">
<p class="fcc-eyebrow">Boulangerie Le Fournil d’Auguste · retrait en boutique</p>
<h2 class="fcc-title" id="fcc-titre">Commander pour le week-end</h2>
<fieldset class="fcc-fs" aria-describedby="fcc-err-articles">
<legend class="fcc-legend">Vos articles</legend>
<ul class="fcc-rows" role="list">
<li class="fcc-row">
<label class="fcc-prod" for="fcc-tradition">Baguette de tradition <span class="fcc-price">1,30 €</span></label>
<div class="fcc-stepper">
<button class="fcc-step" type="button" data-fcc-step="-1" aria-label="Un de moins : Baguette de tradition">−</button>
<input class="fcc-qty" id="fcc-tradition" name="tradition" type="number" inputmode="numeric" min="0" max="20" value="0" data-fcc-price="130" data-fcc-name="Baguette de tradition">(() => {
if (!document.querySelector(".fcc")) return;
document.querySelectorAll("[data-fcc]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const full = JSON.parse(root.getAttribute("data-fcc-full"));
const qty = [...root.querySelectorAll("[data-fcc-price]")];
const slots = [...root.querySelectorAll('[name="creneau"]')];
const day = root.querySelector('[name="jour"]');
const name = root.querySelector('[name="nom"]');
const phone = root.querySelector('[name="telephone"]');
const status = root.querySelector("[data-fcc-status]");
const $ = (selector) => root.querySelector(selector);:root {
--fcc-card: #fffdf8;
--fcc-text: #2b2118;
--fcc-muted: #5e5043;
--fcc-accent: #92400e;
--fcc-line: #dccfbf;
--fcc-soft: #f8eedf;
--fcc-error: #b91c1c;
--demo-formulaire-commande-click-collect-bg: #f2eadf;
--demo-formulaire-commande-click-collect-text: #2b2118;
}
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