TWebCheckBox label/caption doesn't show in Bootstrap

Hi,

I set the TWebCheckBox.caption:='test test test test test test end', but it is not showing in Bootstrap app, I see only checkbox without label.

Project for repro:
BootstrapCheckbox.zip (1.4 MB)

Hi, @brunofierens what with this issue , can you reproduce the problem?

This is because conceptually a TWebCheckBox in TMS WEB Core is modelled after a VCL TCheckBox and a checkbox in HTML is just a checkbox without caption. So, there needs to be a label HTML element also if you want a caption mapped on it.

The only thing we can do is make this smarter in the next version to allow either mapping on a single HTML INPUT element where the caption will NOT be linked but is assumed to be set in HTML or link to a SPAN element that has a first child HTML INPUT CHECKBOX element and a 2nd element a SPAN to hold the label.

Hmmmmmmm ok it is idea ... but in general why this object can't be rendered like this.

<input type="checkbox" id="check1">
<label id="checkwithdrawlabel" for="check1">This is text which is set in caption</label>

Extra work should be add TWebCheckBox.Caption as label and when you set checkbox.visible:=false the checkbox should be hide along with label.

We will discuss this here internally.

ok ... thx in advance.