Skip to content

Quote request form with site photos

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
Open in a new tab

Description

For a tradesperson, a quote request without photos nearly always ends with a trip to see the site. This form, a renovation company’s, therefore asks in order for: the type of work and a description of at least 30 characters (with a counter), the desired start as four single-choice cards (“As soon as possible”, “Within the month”, “In 1 to 3 months”, “No set date”), then the photos and contact details. Photos are picked with the browser’s button or dropped into the frame; each one shows as a thumbnail with its name, its size in KB or MB, and a “Remove” button. Choices add up: six photos at most, 10 MB at most each, duplicates and non-image files refused with a message naming the file. Kept photos stay in the real file field (synced through DataTransfer), so they are sent with FormData like any multipart submission; HEIC photos the browser cannot display are kept, with a “Preview unavailable” note. On submission, an error summary receives focus, each link puts the cursor in the relevant field, and the confirmation repeats the number of photos and the chosen timing. To wire up sending, listen to the devis-photos:envoi event, which carries the form data including photos, and post it to your service (Formspree, your own API…); without JavaScript, the form stays a real multipart form with a multiple file field. Accessibility: tied labels, hints and errors linked with aria-describedby, timing group as a radiogroup with aria-invalid, additions, refusals and removals announced in a role=status region, focus moved to the next photo after a removal, 44 px targets, AA contrast in light and dark mode, forced-colours fallback, transitions turned off with prefers-reduced-motion. Colours and radius are edited in the --fdp-* variables (including --fdp-radius). No dependencies.

Code

Loading the code…

The code of this component in

Archive contents

formulaire-demande-devis-photos-chantier-html-tailwind.zip3 files · 12 Ko

  • index.html34 Ko
  • README.md6 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 3, 2026.

Reviews

No reviews yet.

In the same spirit

  • A recruitment form for small businesses: target position, introduction, CV checked in the browser and GDPR consent, with inline errors.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • 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
    Component
  • 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
    Component
  • 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
    Component