Engineering
kirby-forms-and-frontend-actions avatar

kirby-forms-and-frontend-actions

Implements frontend forms and actions in Kirby CMS, including contact forms, file uploads, email handling, and page creation from the frontend.

Introduction

This skill provides a robust framework for managing user-generated content and interactive workflows within a Kirby CMS project. It is designed for developers who need to build secure and functional frontend submission flows without relying on third-party plugins. By leveraging Kirby’s native controller and routing system, it enables seamless handling of POST requests, form validation, and data persistence directly from the client interface.

  • Enables secure contact form development with integrated CSRF verification and honeypot spam protection.

  • Supports complex frontend interactions including multi-field file uploads with MIME type and file size constraints.

  • Facilitates automated page creation from frontend submissions, allowing users to register or contribute content dynamically.

  • Integrates with Kirby’s mail infrastructure to send automated responses or notifications, including support for file attachments.

  • Provides a standardized approach to error handling, ensuring that form feedback and validation results are communicated back to the user consistently.

  • Offers deep integration with the Kirby MCP server, allowing agents to inspect blueprints, controllers, and templates to maintain consistency.

  • Users should define validation rules and form requirements before implementation to ensure data integrity.

  • Always ensure CSRF protection is active for every POST-based endpoint to mitigate security vulnerabilities.

  • When implementing file uploads, prioritize server-side sanitization and validation of MIME types and size limits.

  • The controller flow typically follows a standard pattern: CSRF check, input normalization, validation, spam guarding, persistence or dispatch, and finally, a controlled redirect to a success state.

  • Use the provided error payload format to ensure compatibility with standard Kirby frontend rendering patterns, returning errors and old input data for better UX.

  • Regularly verify setups by rendering pages through the MCP toolchain to catch configuration issues early in the development cycle.

Repository Stats

Stars
47
Forks
1
Open Issues
2
Language
PHP
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 05:41 AM
View on GitHub