In this episode, we explore the form processing state in Inertia.js forms—basically, how you can tell when your form is actively being submitted. We start by dumping out the form object on the page and watching its processing
property briefly switch to true
every time we hit the submit button.
To make things easier to see, we even add an artificial delay on the backend using PHP's sleep
function, so the form stays stuck in the processing state for a couple of seconds. This gives us a chance to demo how the processing
property works in real time.
With this new insight, we show practical ways to use this property—like automatically disabling the submit button while the form is processing to prevent duplicate submits, and visually indicating the inactive state by reducing button opacity. We walk through the code to add these features, ensuring the UI gives users clear feedback whenever a submission is in progress.
By the end, you’ll know exactly how to use the processing
state to polish your forms and improve your app’s user experience.