1
Create a server action
Submit the form data from the server so Formbase returns JSON instead of a redirect.This works for both text fields and file uploads.
2
Wire it to a client component
Client-side alternative
If you must submit from the browser, treat a303 response as success:
Server actions avoid CORS issues and give you a JSON response. Use them when possible.