A quote request form for agencies, studios and freelancers, built with Bootstrap 6. A forest green side panel explains what happens after sending, using the new Stepper. The form collects contact details, a service, a budget on a Bootstrap 6 Range with a currency bubble, a timeline picked from radio cards, project details and optional file attachments.
How it works
The root .qrf-root holds a two-column .qrf-card: .qrf-aside with an .stepper and contact details, and the <form class="qrf-form" data-bs-validate novalidate>. Fields sit in .form-field wrappers inside the .qrf-grid CSS grid. data-bs-validate makes Bootstrap show .invalid-feedback through :user-invalid, so validation styling needs no JavaScript.
The service picker is a native <select class="form-control">. The budget uses .form-range with data-bs-bubble and a <datalist> for the tick labels. The script disposes the auto-created instance and calls Range.getOrCreateInstance(range, { bubble: true, formatter }), so the bubble shows $12,000 instead of a bare number. The .qrf-budget-out output and aria-valuetext update on every input event.
The timeline uses .form-field-card radios, which highlight with :has(:checked). The attachment area .qrf-drop is a styled <label> for a visually hidden input[type=file]. It accepts clicks and drag-and-drop. Chosen files appear as .chip items with a .chip-dismiss button. The script keeps its own array and rebuilds input.files with DataTransfer, so a single file can be removed. Files over 10 MB (MAX_SIZE) are skipped with a message.
On submit the script calls preventDefault(), sets aria-invalid on each control and focuses the first invalid one. A valid form shows a spinner on .qrf-submit, simulates sending, then shows .qrf-success with the name, service and budget, and resets the form.
Customization
--qrf-forest,--qrf-clayand--qrf-creamon.qrf-root: change the brand green, the terracotta accent and the page background.- The
--bs-primary-*,--bs-control-checked-bgand--bs-focus-ringoverrides on.qrf-root: recolor the button, range, radios, checkbox and focus rings together. min,maxandstepon#qrf-budget, plus the<option>labels in#qrf-ticks: set the budget scale.- The
money()helper andformatBudget()inscript.js: switch to another currency or format. MAX_SIZEand theacceptattribute on#qrf-files: change the size limit and allowed file types.- Replace the
setTimeoutin the submit handler withfetch('/api/quotes', { method: 'POST', body: data }).FormDataalready includes the files.
Use cases
- Agencies and freelancers: clients choose a service and set a budget with a currency slider
- Contractors and local services: timeline cards let prospects pick when they need the work
- Custom project inquiries: drag-and-drop upload attaches briefs and reference files
- Sales pages: CSS validation checks the required fields before the request is sent
Accessibility
Each control has a <label>. Errors are linked with aria-describedby and announced through aria-invalid. The timeline is a <fieldset> with a <legend>, and the radio cards show a visible focus outline. The hidden file input stays keyboard focusable, and the drop zone shows its focus ring. .qrf-file-status is an aria-live region for added or removed files. The success alert receives focus. The drop zone transition is disabled under prefers-reduced-motion.
Bootstrap 6 notes
form-select is gone, so the select uses form-control. Checks are a plain .check, btn-primary becomes btn-solid theme-primary, and .form-range is now a wrapper with a JS-driven fill and bubble. data-bs-validate replaces needs-validation plus was-validated. Built on Bootstrap 6.0.0-alpha.1, so APIs can still change. Icons come from Bootstrap Icons.