Checkbox in ui.form bound to ui.datatable will not check

I have created a really detailed snippet in the hopes you can help me find the right way to bind a ui.form containing a checkbox to a ui.datatable with a column of checkboxes. The form is intended as an editor for existing entries, as well as a way to enter new questions/entries.

https://snippet.webix.com/g5lhza0f

Problem:
The ui.checkbox in my ui.form will not allow users to check the box on or off. The form’s checkbox can only be updated by selecting a record from the bound datatable.

Desired solution:
I would like users to be able to add a new record with the form, including the ability to indicate (via ui.checkbox) if the question is Required. If the user selects a datatable entry, that entry appears editable in the form, and it allows the user to modify the question, but I also want them to be able to adjust the “Required” status using the form.

I am open to alternatives as well…

Thanks, in advance, for any assistance.

Hello,

You have non-unique ids for form elements: “question_id” and “is_required”, which is not possible for a Webix app, where each view should either have a unique id or no id (it will be auto-generated, actually).

Non-unique ids do not immediately break the app, but there can be issues with logic later on. Please, check the updated snippet: https://snippet.webix.com/nrskbsbe

Btw, in a debug mode Webix can show warnings about such situations.

Once again, you’ve quickly identified and clarified something that I misunderstood from code examples I cobbled together.

Thanks Helga, for the rapid solution!