Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Input submit gets "form-item__textfield" class #305

Open
thamas opened this issue Nov 23, 2018 · 1 comment
Open

Input submit gets "form-item__textfield" class #305

thamas opened this issue Nov 23, 2018 · 1 comment

Comments

@thamas
Copy link
Contributor

thamas commented Nov 23, 2018

…which overrides some of the stylings of the submit button.

The reason is that input.twig hardcodes the "form-item__textfield" class and adds it to every input type. Which means submit inputs get it too but they definitely are not text inputs! :)

There are more possible solutions.

  1. Create a separate _input-text.twig template, add the class to that only and add separate Drupal templates for text-like inputs (input--textfield.html.twig, input--email.html.twig etc.) which include this component instead of _input.twig.
  2. Create an input--submit.html.twig Drupal template which includes the button component. In this case we have to submit the input value as 'button_content'.
  3. Refactor the whole thing and do not include a hardcoded class. This could be a longer-term goal… :)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants