How to remove label from form field


#1

I want to have a radio field without a label, but when I remove the label from the Yaml, it displays a 0 on the website.

What should I do?


#2

Since it’s hard coded to accept a value, have you tried just adding spaces? If that fails, you could hide the label within the css. You can target specific labels by their for attribute like

label[for='checkbox'] { display:none; }

#3

This seems not to be documented: try label: false.


#4

label: false did the trick :+1:


#5

I’ll add these to my (long) list of things to investigate:

  • is label: false documented?
  • what is causing the display of 0 when label is omitted? (theme or form plugin)
  • should omitting the label property be “supported” such that it is the same as setting it false?