If you could add something to Kentico, what would it be and why?

Wrap checkbox/radio input and label inside HTML element to control line-break issues

Creating a Kentico form with a checkbox/radio button list with the "Repeat direction:" set to horizontal renders a series of checkbox/radio form controls and labels with no <br> tags. However, because there is no HTMl element that groups each control/label pair, the label will drop to a new line while the checkbox stays.

By wrapping control/label pair inside an HTML element, such as span (even with no CSS class applied), gives us the ability to control this line-break issue with CSS.

Current output example (stripping all id, values and for attributes):

<span iclass="radio radio-list-horizontal">
<input type="radio" value="Phone"><label>Phone</label>
<input type="radio" value="Email"><label>Email</label>
<input type="radio" value="Phone or Email"><label>Phone or Email</label>
</span>

Suggested output example:

<span class="radio radio-list-horizontal">
<span><input type="radio" value="Phone"><label>Phone</label></span>
<span><input type="radio" value="Email"><label>Email</label></span>
<span><input type="radio" value="Phone or Email"><label>Phone or Email</label></span>
</span>

With the suggest output, I can now control this line-break issue with CSS:

,radio-list-horizontal > span,
.checkbox-list-horizontal > span {
display: inline-block
}

13 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Andrew White shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base