Skip to content

Forms

WAGE includes a built-in form handler that covers spam prevention, validation, email delivery, and file storage.

  • Spam prevention — Cloudflare Turnstile (free, privacy-friendly CAPTCHA alternative)
  • Server-side validation — required fields, email format, length limits
  • Email delivery — sends form data via wp_mail()
  • File storage — submissions saved to the data/ directory (protected from public access)
  1. Log into Cloudflare Dashboard
  2. Go to Turnstile → Add Site
  3. Copy the Site Key and Secret Key

In functions.php:

define('WAGE_TURNSTILE_SITE_KEY', 'your-site-key');
define('WAGE_TURNSTILE_SECRET_KEY', 'your-secret-key');

The framework handles rendering the widget and validating the response server-side.

Form submissions are stored in the child theme’s data/ directory. This directory is protected from direct web access via .htaccess.