Skip to content

fix: add action and method attributes to contact form preprocess - #95

Merged
doljak merged 8 commits into
mainfrom
feat/contact-page-79-twig-template-css-layout-and-drupal-form-integration
May 7, 2026
Merged

doljak merged 8 commits into
mainfrom
feat/contact-page-79-twig-template-css-layout-and-drupal-form-integration

Conversation

@doljak

@doljak doljak commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • doljak_theme_preprocess_contact_message_form() construía $attributes apenas a partir de $form['#attributes'], que no Drupal não inclui action nem method
  • Sem method="post", o browser enviava o form como GET e o Drupal ignorava a submissão
  • Fix: adiciona action e method ao objeto Attribute a partir de $form['#action'] e $form['#method']

Test plan

  • ddev start → acessar /contact
  • Inspecionar HTML: confirmar <form action="/contact" method="post" ...>
  • Preencher e submeter o form → verificar email no Mailpit

Closes #79

@doljak
doljak merged commit e31de7b into main May 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Theme + Form API] Contact page — Twig template, CSS layout and Drupal form integration

1 participant