126 lines
5.9 KiB
PHP
126 lines
5.9 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Email Recipient
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The email address that contact form submissions will be sent to.
|
|
|
|
|
*/
|
|
'recipient' => env('CONTACT_FORM_RECIPIENT', 'contact@example.com'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Rate Limiting
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Maximum number of submissions per IP within the given time window.
|
|
|
|
|
*/
|
|
'rate_limit' => [
|
|
'max_attempts' => env('CONTACT_FORM_MAX_ATTEMPTS', 3),
|
|
'decay_minutes' => env('CONTACT_FORM_DECAY_MINUTES', 15),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| IP Blacklist
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| IP addresses that will always be blocked as spam.
|
|
|
|
|
*/
|
|
'blacklisted_ips' => [],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Spam Detection
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Configuration for the built-in spam detection.
|
|
|
|
|
*/
|
|
'honeypot_fields' => ['company_check', 'website', 'url', 'website_url'],
|
|
|
|
'spam' => [
|
|
'min_fill_time_seconds' => env('CONTACT_FORM_MIN_FILL_TIME', 3),
|
|
'suspicious_patterns' => [
|
|
'/\b(viagra|cialis|casino|poker|lottery|bitcoin|crypto)\b/i',
|
|
'/\b[A-Z]{10,}\b/',
|
|
'/<script|<iframe|javascript:/i',
|
|
],
|
|
'max_links_in_message' => 2,
|
|
'max_repeated_chars' => 10,
|
|
'disposable_email_domains' => [
|
|
'tempmail.com',
|
|
'guerrillamail.com',
|
|
'10minutemail.com',
|
|
'mailinator.com',
|
|
'throwaway.email',
|
|
'yopmail.com',
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Form Presets
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Predefined field configurations for different form types.
|
|
| See README for customization and defining your own forms.
|
|
|
|
|
*/
|
|
'presets' => [
|
|
'simple' => [
|
|
'name' => ['type' => 'text', 'rules' => ['required', 'string', 'max:120'], 'label' => 'Name', 'required' => true],
|
|
'email' => ['type' => 'email', 'rules' => ['required', 'email:rfc,dns', 'max:150'], 'label' => 'Email', 'required' => true],
|
|
'message' => ['type' => 'textarea', 'rules' => ['required', 'string', 'max:2000'], 'label' => 'Message', 'required' => true],
|
|
'privacy' => ['type' => 'checkbox', 'rules' => ['accepted'], 'label' => 'Privacy Policy', 'required' => true],
|
|
'honeypot' => ['type' => 'honeypot', 'name' => 'website', 'rules' => ['nullable', 'string', 'max:0']],
|
|
],
|
|
'full' => [
|
|
'first_name' => ['type' => 'text', 'rules' => ['required', 'string', 'max:100'], 'label' => 'First Name', 'required' => true],
|
|
'last_name' => ['type' => 'text', 'rules' => ['required', 'string', 'max:100'], 'label' => 'Last Name', 'required' => true],
|
|
'email' => ['type' => 'email', 'rules' => ['required', 'email:rfc,dns', 'max:150'], 'label' => 'Email', 'required' => true],
|
|
'phone' => ['type' => 'tel', 'rules' => ['nullable', 'string', 'max:80'], 'label' => 'Phone', 'required' => false],
|
|
'company' => ['type' => 'text', 'rules' => ['required', 'string', 'max:150'], 'label' => 'Company', 'required' => true],
|
|
'message' => ['type' => 'textarea', 'rules' => ['required', 'string', 'max:2000'], 'label' => 'Message', 'required' => true],
|
|
'privacy' => ['type' => 'checkbox', 'rules' => ['accepted'], 'label' => 'Privacy Policy', 'required' => true],
|
|
'honeypot' => ['type' => 'honeypot', 'name' => 'company_check', 'rules' => ['nullable', 'string', 'max:0']],
|
|
],
|
|
'business' => [
|
|
'first_name' => ['type' => 'text', 'rules' => ['required', 'string', 'max:100'], 'label' => 'First Name', 'required' => true],
|
|
'last_name' => ['type' => 'text', 'rules' => ['required', 'string', 'max:100'], 'label' => 'Last Name', 'required' => true],
|
|
'email' => ['type' => 'email', 'rules' => ['required', 'email:rfc,dns', 'max:150'], 'label' => 'Email', 'required' => true],
|
|
'phone' => ['type' => 'tel', 'rules' => ['nullable', 'string', 'max:80'], 'label' => 'Phone', 'required' => false],
|
|
'company' => ['type' => 'text', 'rules' => ['required', 'string', 'max:150'], 'label' => 'Company', 'required' => true],
|
|
'project_type' => [
|
|
'type' => 'select',
|
|
'rules' => ['nullable', 'string', 'max:150'],
|
|
'label' => 'Project Type',
|
|
'options' => [
|
|
'consulting' => 'Consulting',
|
|
'implementation' => 'Implementation',
|
|
'support' => 'Support',
|
|
],
|
|
],
|
|
'message' => ['type' => 'textarea', 'rules' => ['required', 'string', 'max:2000'], 'label' => 'Message', 'required' => true],
|
|
'timeline' => [
|
|
'type' => 'select',
|
|
'rules' => ['nullable', 'string', 'max:150'],
|
|
'label' => 'Timeline',
|
|
'options' => [
|
|
'asap' => 'As soon as possible',
|
|
'3months' => 'Within 3 months',
|
|
'6months' => 'Within 6 months',
|
|
],
|
|
],
|
|
'privacy' => ['type' => 'checkbox', 'rules' => ['accepted'], 'label' => 'Privacy Policy', 'required' => true],
|
|
'honeypot' => ['type' => 'honeypot', 'name' => 'company_check', 'rules' => ['nullable', 'string', 'max:0']],
|
|
],
|
|
],
|
|
|
|
];
|