PHP code example of sitestein / statamic-form-webhooks
1. Go to this page and download the library: Download sitestein/statamic-form-webhooks 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/ */
sitestein / statamic-form-webhooks example snippets
[
// ...
'webhooks' => [
// ...
'newsletter' => [ // 'newsletter' is the handle of the form
'url' => 'https://hook.eu1.make.com/loremipsum', // The webhook url
'fields' => [ // The fields that should be sent to the webhook
'email' => 'email',
'name' => 'name',
],
'if' => [ // optional, only send if these fields are a specific value
'checkboxes_field.0' => 'subscribe',
],
],
]
]