@jerad
To get form data from Ember.js checkboxes, you can use the {{input}}
helper in your template to bind the checkboxes to a property on your controller or component. Here's an example of how you can do this:
1 2 |
{{input type="checkbox" checked=isChecked1 onChange=(action (mut isChecked1))}} Option 1 {{input type="checkbox" checked=isChecked2 onChange=(action (mut isChecked2))}} Option 2 |
1 2 3 4 5 6 |
import Controller from '@ember/controller'; export default Controller.extend({ isChecked1: false, isChecked2: false, }); |
1 2 |
let isChecked1 = this.get('isChecked1'); let isChecked2 = this.get('isChecked2'); |
By using the {{input}}
helper and binding the checkboxes to properties on your controller or component, you can easily access the form data from Ember.js checkboxes.