Make checkbox inputs can default to unchecked

This commit is contained in:
Oliver-Akins 2025-07-25 22:26:50 -06:00
parent 312202191d
commit 27dbc2db47
2 changed files with 14 additions and 1 deletions

View file

@ -33,8 +33,9 @@ export class Ask extends HandlebarsApplicationMixin(ApplicationV2) {
inputs: {
template: filePath(`templates/Ask/inputs.hbs`),
templates: [
filePath(`templates/Ask/inputs/input.hbs`),
filePath(`templates/Ask/inputs/checkbox.hbs`),
filePath(`templates/Ask/inputs/details.hbs`),
filePath(`templates/Ask/inputs/input.hbs`),
],
},
controls: {

View file

@ -0,0 +1,12 @@
<label
for="{{id}}"
>
{{ label }}
</label>
<input
type="checkbox"
id="{{ id }}"
name="{{ key }}"
{{ checked defaultValue }}
{{#if autofocus}}autofocus{{/if}}
>