Score:0

Twig template for field component of specific form

ua flag
Sam

I'm using template hints to attempt to theme a specific part of a single form.

I have a custom template for a views block (block--views-exposed-filter-block--search-custom-page-1.html.twig), but is it possible to have a specific template for an element of that form, for example, the label?

For example, if the universal template file is:

templates/form/input.html.twig 

is

templates/form/block--views-exposed-filter-block--search-custom-page-1-label.html.twig

a functioning naming convention?

id flag
What do the Twig debugging HTML comments say?
ua flag
Sam
@cilefen <!-- BEGIN OUTPUT from 'themes/custom/mytheme/templates/form/form-element-label.html.twig' --> It doesn't give suggestions.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.