Ready to get started?

Join Adocasts Plus for $8.00/mo, or sign into your account to get access to all of our lessons.

robot mascot smiling

The useForm Helper

In this lesson, we'll introduce the useForm helper composable provided by InertiaJS. We'll refactor our current form to use the useForm helper instead and see how it can help manage our form state, errors, and submission.

Published
Sep 13, 24
Duration
8m 0s

Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.

Adocasts

Burlington, KY

Chapters

00:00 - Refactoring to make use of the useForm helper
02:25 - Checking for errors from for form
03:15 - Normalizing our errors to a comma-delimited string
05:28 - Adding a loading indicator when our form is processing
07:00 - Clearing form values after successful submission

Ready to get started?

Join Adocasts Plus for $8.00/mo, or sign into your account to get access to all of our lessons.

Join The Discussion! (2 Comments)

Please sign in or sign up for free to join in on the dicussion.

  1. Commented 14 days ago

    Hi! Just wanted to share that a new update for @adonisjs/inertia has been released. You no longer need to declare errors in the Inertia config, and errors are now returned as a single string instead of an array of strings.

    1

    Please sign in or sign up for free to reply

    1. Commented 12 days ago

      Yes, thank you for sharing!! Once completed, we'll be adding a new module to the end of this series covering what's new in Inertia v2 and the AdonisJS adapter and I'll circle back and add/edit some lessons to include notes for outdated things like this.

      1

      Please sign in or sign up for free to reply