Symfony UX: Turbo
Globally Disable Buttons on Form Submit
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

I was going through my site's JavaScript and I saw this piece of code in app.js:

document.addEventListener('turbo:submit-start', (event) => {
    event.detail.formSubmission.submitter.classList.toggle('loading');
});

This must be the code responsible for adding a loading state to the buttons in my forms!

How does the Turbo event turbo:submit-start work?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.