PHP code example of xpertbot / craft-wheelform

1. Go to this page and download the library: Download xpertbot/craft-wheelform 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/ */

    

xpertbot / craft-wheelform example snippets


return [
    'purgeMessages' => true, //True / False value to allow Cron Job to go
    'purgeMessagesDays' => 30, //Number of days messages should live in your database
];

return [
    'forms' => [
        // ID of form
        3 => [
            // This is the email to use for this specific form
            'from' => '[email protected]',
        ],
        5 => [
            // This can also be an array with a custom name
            'from' => [
                '[email protected]' => "Form 5 Custom Name",
            ]
        ]
    ]
];

return [
    'template' => '_emails/custom',
    'notification' => [
        'template' => '_emails/notification',
        'subject' => 'Default Notification Subject',
    ],
    'forms' => [
        1 => [
            'template' => '_emails/form1_template',
            'notification' => [
                'template' => '_emails/notification2',
                'subject' => 'Form specific Subject',
            ],
        ],
        3 => [
            'template' => '_emails/form3_template',
        ],
    ],
];

return [
    'forms' => [
        1 => [
            'skip_attachments' => true, // True/False value, leave empty if not needed.
        ],
    ],
];
twig
{{ form.open("", {
        'novalidate': 'novalidate',
        'id':'custom-form',
        'class': 'custom-form',
    }, "POST") }}