Click submit → no request, no error, no toast
appears when:User clicks the submit button and nothing happens — no network request, no UI change, no error in console
form submit does nothing
Six root causes for silent submit failures in React apps. The DevTools Network tab separates them in under a minute.
event.preventDefault() in the submit handler, a button with type="button" instead of type="submit", or anonClick wired to the button instead of onSubmit on the form. Open DevTools Network tab — if nothing fires, the handler is not attached; if the page reloads, preventDefault is missing.Quick fix for form submit does nothing
01function SignupForm() {02 async function onSubmit(e: React.FormEvent<HTMLFormElement>) {03 e.preventDefault(); // synchronous — must run before any await04 const data = new FormData(e.currentTarget);05 06 try {07 const res = await fetch("/api/signup", { method: "POST", body: data });08 if (!res.ok) throw new Error(await res.text());09 toast.success("Account created");10 } catch (err) {11 toast.error(err instanceof Error ? err.message : "Submission failed");12 }13 }14 15 return (16 <form onSubmit={onSubmit}>17 <input name="email" type="email" required />18 <button type="submit">Sign up</button>19 </form>20 );21}Deeper fixes when the quick fix fails
01 · Render react-hook-form errors inline
01const { register, handleSubmit, formState: { errors } } = useForm();02 03<form onSubmit={handleSubmit(onSubmit)}>04 <input {...register("email", { required: "Email is required" })} />05 {errors.email && (06 <p role="alert">{errors.email.message as string}</p>07 )}08 <button type="submit">Submit</button>09</form>02 · Reset isSubmitting in a finally block
01const [isSubmitting, setIsSubmitting] = useState(false);02 03async function onSubmit() {04 setIsSubmitting(true);05 try {06 await save();07 } finally {08 setIsSubmitting(false); // guarantees the button re-enables even on error09 }10}03 · Associate a button outside the form via form= attribute
01<form id="signup" onSubmit={onSubmit}>...</form>02 03{/* Button can live outside the form DOM */}04<button type="submit" form="signup">Submit</button>Why AI-built apps hit form submit does nothing
AI-generated form code creates valid JSX and wires handlers that look correct in isolation. Failures come from context. A <button onClick=...> inside a <form> without type="submit" triggers a native submit, reloads the page, and cancels the click handler. A <button type="submit"> outside the form has no form to submit. A handler attached to onSubmit without e.preventDefault() works on the first click then reloads on the second.
The second class is silent validation. React Hook Form, Formik, and Zod default to blocking submit when validation fails. If the AI-generated code does not render the errors object to the user, the form feels broken. Click submit, nothing happens, no message. Fix: render validation errors somewhere the user can see them.
The third cause is the swallowed 500. The AI-generated handler wraps fetch in try/catch that logs to console and does nothing else. API returns 500. Catch block catches. User sees no feedback. In production where console.log is invisible, the form appears to do nothing. Fix: display errors (toast, inline), not just log them.
form submit does nothing by AI builder
How often each AI builder ships this error and the pattern that produces it.
| Builder | Frequency | Pattern |
|---|---|---|
| Lovable | Every form scaffold | Binds onClick to the button, not onSubmit to the form |
| Bolt.new | Common | Omits e.preventDefault() in async handler |
| v0 | Common | Button inside a dropdown portal — escapes form DOM |
| Cursor | Sometimes | Swallows fetch errors in generic try/catch |
| Base44 | Rare | Ships type='button' on the submit |
Related errors we fix
Stop form submit does nothing recurring in AI-built apps
- →Use react-hook-form handleSubmit — it calls preventDefault for you and surfaces errors.
- →Prefer form action server actions in Next.js 16 — eliminates the preventDefault footgun entirely.
- →Toast every catch block. Silent failures are the bug, not the underlying error.
- →Lint against onClick on buttons inside forms; prefer onSubmit on the form element.
- →Write a Playwright test that asserts the submit fires a request and renders a success toast.
Still stuck with form submit does nothing?
form submit does nothing questions
Why does clicking submit do nothing with no error in the console?+
How do I tell which cause is mine in 30 seconds?+
What does preventDefault actually prevent?+
Why does the button work on desktop but not mobile?+
How long does this take to fix?+
Ship the fix. Keep the fix.
Emergency Triage restores service in 48 hours. Break the Fix Loop rebuilds CI so this error cannot ship again.
Hyder Shah leads Afterbuild Labs, shipping production rescues for apps built in Lovable, Bolt.new, Cursor, Replit, v0, and Base44. our rescue methodology.