Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

How to remove label from form field

Solved by Hugh Barnes View solution

Started by Fubaruba 8 years ago · 4 replies · 1774 views
8 years ago

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?

8 years ago

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

CSS
label[for='checkbox'] { display:none; }
8 years ago Solution

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

8 years ago

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?

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1135 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 60 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 132 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 108 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 127 7 months ago