0

As the title says,

There is a specific Form Container that I would like to add a twig to that is on a page having its own twig. No theme hook name suggestion is provided when I inspect its element.

enter image description here

My purpose is to style the specific form to be a credit card form.

enter image description here

1

You could try to add your own template suggestion via hook_theme_suggestions_HOOK_alter, which would mean hook_theme_suggestions_container_alter. There you might target the container by id or some other attribute (id does not seem promising here).

The container.html.twig does only provide a wrapping div around other content. While you could add more html to this, you might have to think about if container.html.twig is the right place to start here.

  • thanks, i will try this one – Akira Midori Sep 12 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.