PHP code example of tearoom1 / uniform-contact-block

1. Go to this page and download the library: Download tearoom1/uniform-contact-block library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tearoom1 / uniform-contact-block example snippets


 snippet('uniform-contact/js'); 

 snippet('uniform-contact/css'); 

return [
    'tearoom1.uniform-contact-block' => [
        'enabled' => true, // default true
        'alwaysIncludeAssets' => true, // default true
        'fromEmail' => '[email protected]',
        'toEmail' => '[email protected]',
        'fromName' => 'My Name',
        'formBrowserValidate' => 'validate',
        'formNameRequired' => true,
        'formEmailRequired' => true,
        'formMessageRequired' => true,
        'formNamePattern' => '(?=.*\S).{2,}',
        'formEmailPattern' => '[^\s@]+@[^\s@]+\.[^\s@]+',
        'emailEscapeHtml' => false,
        'theme' => 'basic', // default no theme, use 'basic' for a default theme
    ],
    'uniform.honeytime' => [
        'key' => 'base64:your-key-here',
    ],

];

    'simple-captcha' => [ // https://codeberg.org/refbw/uniform-simple-captcha
        'distort' => false,
        'interpolate' => false,
        'applyEffects' => false,
        'applyNoise' => false,
        'applyPostEffects' => false,
        'applyScatterEffect' => false,
        'textColor' => '#57a514',
        'bgColor' => '#fff',
        'width' => 200,
        'height' => 50,
    ],
    'tearoom1.uniform-spam-words' => [
        'spamThreshold' => 8,
        'spamWords' => [
            10 => ['my important spam word'],
        ],
    ]