Urgent.News

the world's headlines, one feed

Editions

Tech

Build a React client intake form with file uploads

Client intake often requires two types of information: searchable answers and files for review. This Vite and React example collects both in the same response. You can try the form without an account. Ask only what you need The example asks for: the client's name; a work email address; the result they need; an optional target date; up to five briefs or reference files. Each answer should help…

This React client intake form example gathers both searchable answers and files for review in a single submission. Upon visiting the form, users are prompted to provide their name, work email address, desired outcome, optional target date, and up to five brief or reference files (in PDF, DOCX, PNG, JPG or JPEG format). Each piece of information aims to prepare the client for the initial call, with detailed discovery questions reserved for the actual meeting. The form's schema is defined within the React application using the Fillo React SDK.

To set up the form, you must first import the necessary components and define the intake form with its ID, title, description, and various blocks for collecting information. The form includes fields for the client's name (required), work email (required), desired outcome (required), optional target date, and file uploads (accepting PDF, DOCX, DOC, PNG, JPG, and JPEG files, with a maximum of five files). The submit button is labeled "Send project details."

Fillo handles the validation, file uploads, and responses, while the React app manages the routing, layout, styles, and actions following submission. The browser directly sends files to the connected storage service, such as Google Drive, Box, Amazon S3, or an S3-compatible bucket, without the need for the Vite app to proxy the files through its own server. The storage credentials remain separate from the browser bundle.

Before deploying the form for client use, it is essential to test various scenarios, including leaving required fields empty, selecting unsupported file types, exceeding file count and storage size limits, interrupting uploads, and verifying the uploaded files' presence in Fillo. Additionally, testing the form's usability on different devices and with keyboard navigation ensures a seamless user experience.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at dev.to →

More in Tech