TOFU

Template Oriented Form Utilities

A powerful WordPress plugin that bridges the gap between complex form logic and template flexibility. Define your structure in PHP, render freely in HTML.

functions.php
add_action('init', function () {
    $template = new \TofuPlugin\Structure\TemplateConfig(
        inputPath: '/contact/',
        confirmPath: '/contact/confirm/',
        resultPath: '/contact/result/',
    );


    \TofuPlugin\Helpers\Form::register(new \TofuPlugin\Structure\FormConfig(
        key: 'form',
        name: 'Contact Form',
        template: $template,
        // ... mail and validation config
    ));
});

Why TOFU?

Simple configuration, powerful results.

Template Config

Define paths for input, confirmation, and result pages explicitly. Maintain control over your form flow without hidden redirects.

Mail Engine

Complex mail routing made simple. Configure auto-replies, admin notifications, and CC/BCC rules directly in your PHP code.

Clean Validation

Over 70 rules — required, max:200, email, file type and size — with translatable messages you can override per field. No dependencies.

Ready to install?

Get started by uploading the plugin to your WordPress installation.

1.

Upload to /wp-content/plugins/

2.

Activate through WordPress 'Plugins' screen