Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Change class of a field label

Solved by Joachim Liedtke View solution

Started by Joachim Liedtke 8 years ago · 1 replies · 982 views
8 years ago

Hi,

the default value of a class in a field label is 'inline'.
How can I change this value through the form setup in the frontmatter.

Thanks in advance.

8 years ago Solution

It seems, that there is no default option to address a label's class via frontmatter settings - WITHOUT overwriting '/user/plugins/form/templates/forms/default/field.html.twig' by your own version in your theme's templates.

There is a Twig Varible 'field.labelclasses' which can be used for that.

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Japhy, 2 days ago
0 60 2 days ago
Forms & Blueprints · by FrViPofm, 3 weeks ago
5 281 3 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2272 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 739 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 824 10 months ago