Closed McGern closed 3 months ago
Thank you for reporting this issue. I am able to reproduce and have logged a ticket for the backlog (FIO-8199). We are always willing to review any contributions to resolve this issue from the open source community.
This worked for me.
Templates.current = {
checkbox: {
form: (ctx: any) => {
const inputId = `${ctx.id}-${ctx.key}`
const input = `
<input
ref="input"
class="form-check-input"
type="checkbox"
id="${inputId}"
>
`;
const label = `
<label class="${ctx.input.labelClass} form-check-label" for="${inputId}">
<span>${ctx.component.label}</span>
</label>
`;
return `
<div class="form-check">
${input}
${label}
</div>
`
}
}
};
Resolved here: https://github.com/formio/formio.js/pull/5581
Nice. Any chance of seeing this in 5x.rc version anytime soon?
I expect so at least in the next month.
Thanks, this is great library, but noticed that when a single checkbox is rendered, there is no "for" attribute, meaning that label can't be clicked to toggle the checkbox state. When using "selectboxes" (i.e. multiple checkboxes) it works fine.
Assume latest version, because it's happening in the live form builder demo and the example pages - showing as v5.0.0-rc.27
example 1
example 2