Forms & PHP
Set up the Leverage contact form so it delivers email to your inbox and resists spam. The template includes a ready-to-use form powered by two PHP files in assets/php.
Directoryassets
Directoryphp
- form.php sends the email
- recaptcha.php verifies the visitor
form.php — sending email
Section titled “form.php — sending email”form.php delivers the message a visitor submits through the contact form.
-
Open
assets/php/form.phpin your code editor. -
Set your recipient address. Find the destination email field and replace it with the address where you want messages delivered.
-
Translate the text (optional). The success and error messages shown to the visitor are defined in this file — reword or translate them to fit your site.
-
Save and upload to your host, then send a test message to confirm it arrives.
recaptcha.php — blocking spam
Section titled “recaptcha.php — blocking spam”recaptcha.php connects the form to Google reCAPTCHA v3 so bots can’t flood your inbox. It needs your
secret key, and the form also needs a site key in your HTML and JavaScript — the full walkthrough
is on its own page: