Skip to content

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 delivers the message a visitor submits through the contact form.

  1. Open assets/php/form.php in your code editor.

  2. Set your recipient address. Find the destination email field and replace it with the address where you want messages delivered.

  3. 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.

  4. Save and upload to your host, then send a test message to confirm it arrives.

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: