Contact Form
FormContact
Forms & UI 2 options JavaScript
Accessible contact form with honeypot spam protection and a package dropdown prefilled from the URL.
Published · by Christopher Alberto
Live demo
Open full screenAt a glance
- Component
FormContact- Category
- Forms & UI
- Used as
- Page block — “Form: Contact”
- Options
- 2 editable fields
- Built with
- PHP, Twig, SCSS, JavaScript
- Platform
- WordPress · Flynt theme · Timber/Twig · ACF Pro
About this component
The site’s contact form, handled by WordPress itself — no form plugin. Messages arrive by email with the sender as Reply-To.
Highlights
- Nonce check plus an invisible honeypot field to stop spam bots.
- “Interested In” dropdown lists the Services packages and is preselected from
?package=, so ad links show which package a lead came from. - Editable success and error messages.
Under the hood
Components/FormContact/
-
_style.scssStyles (SCSS) 123 lines -
functions.phpFields & data (PHP) 246 lines -
index.twigMarkup (Twig) 62 lines -
script.jsBehaviour (JavaScript) 127 lines