I assuming you are trying to add checkbox to a mobile view without connecting it to a form. That’s normally when on gets the undefined label.
Here are the steps to use form fields in mobile:
1: In mobile view, navigate to form option on the right panel.
2: Add a form and configure it to use a particular data model. In this case, I have created a Car data model and added a form to use the same model.
3: Add the checkbox widget (or any form based widget) to the mobile view and open the widget editor.
For checkbox widget editor, you will see the option to connect it to a form and use the attribute “AutomaticTransmission” in this case.
It will then use the attribute name as the label name.
4: For more flexibility i would suggest to use the switch widget instead of checkbox widget for any true/false type attributes. It allows you to set custom labels as well.
You are right about the “setLabel” not working on checkbox. This looks like an issue with the widget. We will work on fixing it. Meanwhile, you can use the “Switch” widget instead of “Checkbox”.
Hope this helps.