Skip to content
Duncan Walker edited this page Mar 7, 2016 · 2 revisions

Form Submission

The {{form-submission}} component adds buttons to your form to connect the submission events with your controller's hooks.

Out-of-the-box this supports save, cancel, and delete buttons:

{{form-submission
  save=false
  cancel=true
}}

You can also set the text and action of any button:

{{form-submission
  cancelAction='goBackTransition'
  cancelText='Go back'
}}

Form Submission Button

This is the button component used by the {{form-submission}} component.

{{form-submission-button
  action='save'
  disabled=false
  text='Save this!'
  type='submit'
}}

Using Your own Buttons for Submission

If you want to use you own buttons to handle form submission, send the save, cancel, or delete actions to the class that has the form mixin added.

The form mixin will manage a formIsSubmitted property you can use to disable buttons when the form is submitting/validating.