Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Change class of a field label

Solved by Joachim Liedtke View solution

Started by Joachim Liedtke 9 years ago · 1 replies · 1049 views
9 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.

9 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 TomW, 3 weeks ago
3 248 3 weeks ago
Forms & Blueprints · by Japhy, 1 month ago
2 503 4 weeks ago
Forms & Blueprints · by FrViPofm, 2 months ago
5 504 2 months ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2499 9 months ago
Forms & Blueprints · by Hugo Oliveira, 10 months ago
0 944 10 months ago