Plugin: Contact Form 7
Plan: CF7 Core Improve
Contact Form 7 CSS Boilerplate | IMWZ – Bespoke DevOps Work Contact Form 7 Styles for basic CSS styling of the form. Form is responsive and has nice rounded corners. For labels and placeholders you need to edit the form in CF7 https://imwz.io/contact-form-7-css-boilerplate/
Improving CF7 design
Floating Labels in Form Fields
Floating Placeholders, Peeky Placeholders
- How to do Contact Form 7 Floating Labels | Jason Somai
- Float Labels with CSS | CSS-Tricks - CSS-Tricks
- Styling a Focused Input’s Label | Auroratide
- Contact Form 7 (CF7) Floating Labels.
Misc Design Inspirations
Revolutionary Discovery: Effortlessly Insert Forms Without ID!
The solution to seamless form usage resilient to content migration, has been uncovered!
But how can we embed the form to be flexible to migration into new site where form ID is different? It turns out that if you have a form shortcode without “id” attribute it will search for the requested form by “title” attribute. And that’s it - so simple.
The source of discovery is this article: Embed contact form 7 in your custom theme
I must use shortcode and not block:
<!-- wp:shortcode --> [contact-form-7 title="Get In Touch"] <!-- /wp:shortcode -->
I believe it will function seamlessly with Polylang, although possible challenges may exist.
Code: Nicer design
CF7 Boilerplate Tag: contact form 7 | WordPress Villain
Attaching files to email
Discover the simple process of attaching a file to an email, as outlined in this official guide: File uploading and attachment
Code: Proper Country Phone input in CF7
Wrapped two libraries and added a settings page in
Contact > CPF Settings. Settings are for all forms, and that by itself is not proper coding.
Using two separate libraries:
- Country picker mrmarkfrench/country-select-js also based on
intl-tel-input, using jQuery
Here are a couple of problematic decisions:
- Outdated libraries - for example,
intl-tel-inputis in version 12.4.0 from 2018, while the latest is v17.0.19 from 2022
- Using jQuery - even WordPress will move on and will probably very soon make jQuery obsolete
Resources for those libraries are taken from:
Updated list of world countries, in JSON, CSV, XML and YAML mledoze/countries
Updated collection of flags country in SVG / PNG fonttools/region-flags
stefangabos/world_countries Extensive constantly updated lists of world countries, country codes in multiple languages and with national flags
Code: HTML5 Validation
Treba uključiti client proveru polja
cf7 “required” attribute - Google Search ako hoćeš da stilizuješ
Code: Upload Progress Bar
Code: Offline Geolocation
Custom coded geolocation is not that complicated - How to display location of an user in a mail send