Download the PHP package tourze/diy-form-bundle without Composer
On this page you can find all versions of the php package tourze/diy-form-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package diy-form-bundle
DIY Form Bundle
中文
A comprehensive dynamic form builder system for Symfony applications, designed for creating surveys, questionnaires, and custom forms with advanced features.
Table of Contents
- Features
- Installation
- Quick Start
- Configuration
- Field Types
- Advanced Usage
- API Documentation
- Dependencies
- Testing
- Contributing
- Security
- License
Features
- Dynamic Form Creation: Create forms with various field types including text, select, radio, checkbox, date, file uploads, and more
- Mobile Captcha Support: Built-in mobile phone verification with SMS captcha
- Rich Field Types: Support for 13 different field types including rich text, images, and files
- Form Analytics: Track form submissions and analyze responses
- EasyAdmin Integration: Administrative interface for managing forms and responses
- Session Management: Step-by-step form completion with session tracking
- Expression Language: Advanced form logic with conditional fields
- JSON-RPC API: Complete API for form management and submission
- Multi-language Support: Full internationalization support
Installation
Install the package via Composer:
Quick Start
1. Enable the Bundle
Add the bundle to your config/bundles.php:
2. Configure Database
Run the migrations to create the required tables:
3. Basic Usage
Create a simple form programmatically:
4. JSON-RPC API Usage
Configuration
Services Configuration
The bundle provides several services that can be configured:
Routing Configuration
Field Types
The bundle supports the following field types:
- Text Fields:
STRING,TEXT,RICH_TEXT - Selection Fields:
SINGLE_SELECT,RADIO_SELECT,MULTIPLE_SELECT,CHECKBOX_SELECT - Date Fields:
DATE,DATE_TIME - Numeric Fields:
INTEGER,DECIMAL - File Fields:
SINGLE_IMAGE,MULTIPLE_IMAGE,SINGLE_FILE - Special Fields:
CAPTCHA_MOBILE_PHONE
Advanced Usage
Form Logic and Conditional Fields
Use expression language to create dynamic forms:
Analytics and Reporting
Track form submissions and generate reports:
Custom Field Types
Extend the field types by implementing custom handlers:
API Documentation
Form Management
GetDiyFormDetail- Get form configurationGetFullDiyFormDetail- Get complete form with all fields
Record Management
CreateDiyFormRecord- Start a new form sessionSubmitDiyFormFullRecord- Submit complete form dataGetDiyFormRecordDetail- Get submission details
Step-by-Step Forms
GetNextDiyFormField- Get next field in sequenceAnswerSingleDiyFormQuestion- Answer individual questions
Dependencies
Core Requirements
- PHP: ^8.1
- Symfony: ^6.4
- Doctrine ORM: ^3.0
- EasyAdmin Bundle: ^4.0
Key Features Dependencies
- Expression Language: For conditional field logic
- Notifier Component: For SMS captcha functionality
- Serializer Component: For API data transformation
- Security Bundle: For user authentication and authorization
Optional Integrations
- JSON-RPC Bundle: For API endpoints (tourze/json-rpc-*)
- Doctrine Extensions: For advanced entity features (tourze/doctrine-*)
- File Storage: For file upload handling
Testing
Running Unit Tests
The bundle includes comprehensive unit tests covering all business logic:
Test Coverage:
- ✅ 187 Unit Tests: All unit tests pass, covering entities, enums, events, and core business logic
- ⚠️ 23 Integration Tests: Currently under development due to complex dependency setup (see Issue #811)
Test Categories
- Entity Tests: Data models and relationships
- Enum Tests: Field types and validation
- Event Tests: Form submission events
- Service Tests: Business logic services
- Controller Tests: API endpoints (integration tests)
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
Design References
This bundle was inspired by various form systems:
All versions of diy-form-bundle with dependencies
ext-random Version *
doctrine/collections Version ^2.3
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
knplabs/knp-paginator-bundle Version ^6.5
monolog/monolog Version ^3.1
nesbot/carbon Version ^2.72 || ^3
psr/container Version ^1.1|^2.0
psr/log Version ^3|^2|^1
psr/simple-cache Version ^1.0|^2.0|^3.0
symfony/cache-contracts Version ^3
symfony/config Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/event-dispatcher-contracts Version ^3
symfony/expression-language Version ^7.3
symfony/form Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/notifier Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/security-bundle Version ^7.3
symfony/security-core Version ^7.3
symfony/security-http Version ^7.3
symfony/serializer Version ^7.3
symfony/uid Version ^7.3
symfony/yaml Version ^7.3
tourze/arrayable Version 1.*
tourze/bundle-dependency Version 1.*
tourze/doctrine-async-insert-bundle Version 1.0.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-ip-bundle Version 1.1.*
tourze/doctrine-snowflake-bundle Version 1.1.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-agent-bundle Version 1.0.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-enum-field-bundle Version 1.0.*
tourze/easy-admin-extra-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/json-rpc-core Version 1.0.*
tourze/json-rpc-endpoint-bundle Version 1.0.*
tourze/json-rpc-lock-bundle Version 1.0.*
tourze/json-rpc-log-bundle Version 1.0.*
tourze/json-rpc-paginator-bundle Version 1.0.*
tourze/json-rpc-security-bundle Version 1.0.*
tourze/lock-service-bundle Version 1.0.*
tourze/symfony-ecol-bundle Version 1.0.*
tourze/symfony-snowflake-bundle Version 1.0.*
tourze/text-manage-bundle Version 1.0.*
tourze/user-avatar-bundle Version 1.0.*
tourze/user-event-bundle Version 1.0.*
tourze/user-id-bundle Version 1.0.*
yiisoft/arrays Version ^3
yiisoft/json Version ^1.0