ember-headless-form
ember-headless-form copied to clipboard
feature add a field.CheckboxGroup
Similar as field.RadioGroup but then for checkboxes.
Obviously would return an array of checked values
<form.Field @name="callBeBackAt" as |field|>
<field.CheckboxGroup class="my-2 flex flex-col" as |group|>
<group.Label>Call me back at/group.Label>
<div class="flex flex-row space-x-2">
<group.Checkbox @value="morning" as |checkbox|>
<checkbox.Input />
<checkbox.Label>Morning</checkbox.Label>
</group.Checkbox>
<group.Checkbox @value="afternoon" as |checkbox|>
<checkbox.Input />
<checkbox.Label>Afternoon</checkbox.Label>
</group.Checkbox>
<group.Checkbox @value="evening" as |checkbox|>
<checkbox.Input />
<checkbox.Label>Evenings</checkbox.Label>
</group.Checkbox>
</div>
</field.CheckboxGroup>
</form.Field>
Interest in this?
Yeah, absolutely. I don't think I have the time to do this, but a PR would certainly be welcome! :)
Hi @simonihmig have some spare time to look at the PR i did? Thanks!