1. Go to this page and download the library: Download makeitfly/cleantalk-symfony 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/ */
// Minimal configuration:
$builder->add('cleantalk', CleanTalkType::class, [
'sender_email_field' => 'email', // Required
]);
// Full configuration:
$builder->add('cleantalk', CleanTalkType::class, [
// One of CleanTalkCheck::MESSAGE or CleanTalkCheck::USER. This defines
// which CleanTalk API endpoint is used:
// @see https://cleantalk.org/help/api-check-message
// @see https://cleantalk.org/help/api-check-newuser
'check_type' => CleanTalkCheck::MESSAGE,
// The email address of the person who submits the form. This will be
// fetched from the 'someProperty' property of the form data.
'sender_email_field' => 'someProperty',
// Alternatively, for this and the following properties you can use a
// callable instead, which will get passed the form data.
'sender_email_field' => function ($formData) {
// Use the form data directly here, or for example fetch the current
// logged in account and get the email that way.
return $formData->getEmail();
},
'sender_nickname_field' => 'senderNickname',
'phone_field' => 'phone',
'message_field' => 'message'
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.