MksDdn Forms Handler is a powerful and flexible form processing plugin that allows you to create and manage forms with multiple delivery methods. Perfect for websites that need reliable form handling with modern integrations.
Component-based structure following SOLID principles with clear separation of concerns:
Core Components (includes/)
* PostTypes – custom post types registration (forms, submissions)
* MetaBoxes – form settings and submission data management
* FormsHandler – main processing logic with REST API support
* Shortcodes – form rendering with AJAX functionality
* AdminColumns – admin interface customization
* ExportHandler – CSV export with filtering
* Security – rate limiting and security checks
* Utilities – helper functions and form creation utilities
* GoogleSheetsAdmin – Google Sheets settings page and OAuth
* Template Functions – global functions for PHP template integration
Handlers (handlers/)
* TelegramHandler – Telegram Bot API integration
* GoogleSheetsHandler – Google Sheets API integration
Assets (assets/)
* css/ – Admin and frontend styles
* js/ – Admin and form scripts
* images/ – Plugin images
`
mksddn-forms-handler/
├── mksddn-forms-handler.php # Main plugin file
├── includes/ # Core components
│ ├── class-post-types.php
│ ├── class-meta-boxes.php
│ ├── class-forms-handler.php
│ ├── class-shortcodes.php
│ ├── class-admin-columns.php
│ ├── class-export-handler.php
│ ├── class-security.php
│ ├── class-utilities.php
│ ├── class-google-sheets-admin.php
│ └── template-functions.php
├── handlers/ # External service handlers
│ ├── class-telegram-handler.php
│ └── class-google-sheets-handler.php
├── templates/ # Template files
│ ├── form-settings-meta-box.php
│ └── custom-form-examples.php
├── assets/ # Static resources
│ ├── css/
│ ├── js/
│ └── images/
├── languages/ # Translations
└── uninstall.php # Cleanup script
`
1. Shortcode (Standard)
php
[mksddn_fh_form slug="contact-form"]
Plugin automatically generates HTML form based on configuration.
2. PHP Templates (Custom Forms)
Integrate pre-built forms in theme templates:
`php
'https://example.com/wp-json/mksddn-forms-handler/v1/forms/contact/submit'
Submit form with files (multipart):
bash
curl -s -X POST \
-F 'name=John' \
-F 'email=john@example.com' \
-F 'attachments[]=@/path/to/file1.pdf' \
-F 'attachments[]=@/path/to/file2.png' \
'https://example.com/wp-json/mksddn-forms-handler/v1/forms/contact/submit'
Fields are configured as JSON in the form settings. Supported types:
options can be an array of strings or objects { "value": "...", "label": "..." }select with multiple choice, set multiple: true (shortcode renders name[])number, optional attributes: min, max, steptel, optional pattern (default server validation uses ^\+?\d{7,15}$)date/time/datetime-local, server validates formats: YYYY-MM-DD, HH:MM, YYYY-MM-DDTHH:MMallowed_extensions: Array of extensions, e.g. ["pdf","png","jpg"]max_size_mb: Maximum size per file (default: 10)max_files: Maximum files per field (default: 5)multiple: Allow multiple files`json
[
{“name”:”name”,”label”:”Name”,”type”:”text”,”required”:true,”placeholder”:”Your name”},
{“name”:”email”,”label”:”Email”,”type”:”email”,”required”:true},
{“name”:”phone”,”label”:”Phone”,”type”:”tel”,”pattern”:”^\+?\d{7,15}$”},
{“name”:”website”,”label”:”Website”,”type”:”url”},
{“name”:”age”,”label”:”Age”,”type”:”number”,”min”:1,”max”:120,”step”:1},
{“name”:”birth”,”label”:”Birth date”,”type”:”date”},
{“name”:”message”,”label”:”Message”,”type”:”textarea”,”required”:true},
{“name”:”agree”,”label”:”I agree to Terms”,”type”:”checkbox”,”required”:true},
{
“name”:”services”,
“label”:”Choose services”,
“type”:”select”,
“multiple”:true,
“options”:[“seo”,”smm”,”ads”]
},
{
“name”:”attachments”,
“label”:”Attach files”,
“type”:”file”,
“multiple”:true,
“allowed_extensions”:[“pdf”,”png”,”jpg”],
“max_size_mb”:10,
“max_files”:3
}
]
`
This plugin can connect to external services when explicitly enabled in a form’s settings:
https://oauth2.googleapis.com/token, https://sheets.googleapis.com/v4/spreadsheets/...https://api.telegram.org/bot/sendMessage