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.

Themes & Styling

Frontend form size adjustment

Solved by Chris Jung View solution

Started by Michael Gollmer 9 years ago · 3 replies · 920 views
9 years ago

Hello there,

right now I'm trying to build ab a form which basically has generic columns (flex-style ;)). I saw that I'm able to assign certain classes to my fields, so I can change their width. BUT it only change the input part of the "form-field"-DIV it doesn't change the size of all the other parts.

image|690x130

I know I can change the "form-field" class in general, but is there a way to change the fields individually??? I want some fields to be 50% and others to be 100% - e.g. street and housenumber should be 50% and message should be 100%.

Would be awesome if somebody has an idea to this.

Regards,
Michael

9 years ago Solution

Do you use antimatter (maybe as base theme)

You can create a template file in the same path as the plugin, like:
/templates/forms/fields/text/text.html.twig

Take a look at user/plugins/form/templates/. You can overwrite every template by copying it (with the corresponding path) into your theme.

👍 1
9 years ago

Thanks, dude. ;)
I'll try it. ;)

Saving my day. It's way too late for me XD.

Oh, one question: I can create that file in my child theme right?

👍 1
9 years ago

Jup. You can. (20 character limit can be hard when answering yes-or-no-questions...)

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 196 2 months ago
Themes & Styling · by Ian, 2 months ago
3 92 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 454 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 47 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 126 3 months ago