Page 1 of 1

remove checkbox label

Posted: 2023-04-29 09:32
by ushay
Hello again,

i saw this on Helper JavaScript documention for hiding labels:

Code: Select all

new AppGiniField("name_patient").hideLabel();
it didn't work on a checkbox label, is there another way to do it?

thanks,

shay,

Re: remove checkbox label

Posted: 2023-04-29 09:54
by jsetzer
Well, technically speaking, checkboxes do not have a descriptive label at the left of the (checkbox) control but only the label at the right hand side of the checkbox (in LTR layouts).

If you hide those labels, your users will not know the purpose of the checkboxes and therefore this would be bad user interface design and might become confusing especially with multiple checkboxes per page. I cannot recommend it.

Anyway, if you really want to, check the HTML code using browser's dev tools. Find the label element, then find the related input. Move the input element outside the label element, then hide or remove the label, using javascript.

I cannot recommend it and, by now, I'm not planning to implement such a feature for usability reasons.

But if there is good reason in your specific usecase for hiding checkbox labels, feel free to describe your aim and perhaps upload a screenshot or mockup. If this is useful, I may consider implementing a solution in a future release.

Re: remove checkbox label

Posted: 2023-04-29 10:25
by ushay
Dear Jan,

thanks for your reply.

i have added a checkbox next to a richtext field, the idea is that the users can choose which field they want to send on a whatsapp message.
if i leave the label to my opinion it doesn't look good.
checkbox .jpg
checkbox .jpg (37.79 KiB) Viewed 11310 times
shay,