Form Action

Loading "Form Action"
πŸ§β€β™‚οΈ I've added some backend code that will handle our form submission. It's at api/onboarding. You can find it in .
Note: the api.server.ts file is some magic from the Workshop app to make it so we can test things out with a backend server without having to actually set up a backend server. It's not something you'd use in a real app.
πŸ‘¨β€πŸ’Ό Great! So we want the user's form submission to be sent along to api/onboarding. By default, when a form is submitted, the browser will send the form data to the current page's URL. We can change this by adding an action attribute to the form element:
<form action="path/to/backend/route">
	<!-- ... -->
</form>
Go ahead and add an action attribute to the form element.
πŸ¦‰ You may notice a full page refresh when you submit the form. We'll talk about this in a future step.

Access Denied

You must login or register for the workshop to view and run the tests.

Check out this video to see how the test tab works.