1. Form Template
Duncan Walker edited this page Mar 7, 2016
·
2 revisions
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'
}}
This is the button component used by the {{form-submission}}
component.
{{form-submission-button
action='save'
disabled=false
text='Save this!'
type='submit'
}}
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.