Download the PHP package vardumper/ibexa-form-builder-bundle without Composer
On this page you can find all versions of the php package vardumper/ibexa-form-builder-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vardumper/ibexa-form-builder-bundle
More information about vardumper/ibexa-form-builder-bundle
Files in vardumper/ibexa-form-builder-bundle
Package ibexa-form-builder-bundle
Short Description Standalone Ibexa DXP bundle for rendering frontend-facing forms managed as Ibexa content.
License MIT
Homepage https://github.com/vardumper/IbexaFormBuilderBundle
Informations about the package ibexa-form-builder-bundle
|
|
IbexaFormBuilderBundle
Standalone Ibexa DXP bundle for rendering frontend-facing forms managed as Ibexa content. Forms are modelled as a content type tree — each field (input, textarea, select, choice, fieldset, horizontal group, button) is a separate content item nested under a form content item. Submissions are stored in a dedicated database table and/or delivered via email.
Requirements
- PHP >= 8.3
- Ibexa DXP >= v4.4 or >= v5.0
- Symfony 5.4.x or 7.x
- Doctrine ORM ^2.11 or ^3.0
Features
- Forms are managed as content inside the Ibexa content tree
- Uses Symfony Forms under the hood, including Validation
- Supports horizontal grouping (eg: first name, last name)
- Tag-aware result caching via Symfony Cache (cache invalidated on content publish)
- Form submissions can be stored in a dedicated
form_submissiondatabase table - Form submissions can trigger an Email notifications (configurable To/CC/BCC/Subject)
- Admin UI for browsing and viewing submissions
- Console commands to install required content types
- Symfony Flex recipe for zero-configuration installation
Installation
1. Install the bundle
If your project uses Symfony Flex (recommended), add the private recipe endpoint to your project's composer.json once:
Then install:
Symfony Flex will automatically:
- Register the bundle in
config/bundles.php - Copy the Doctrine ORM mapping config to
config/packages/ibexa_form_builder.yaml - Copy the Ibexa admin-ui config to
config/packages/ibexa_form_builder_admin_ui.yaml - Copy the route import to
config/routes/ibexa_form_builder.yaml - Copy the database migration to
migrations/
2. Run the migration
The Flex recipe copies a migration to your migrations/ directory that creates the form_submission table.
Run it:
3. Install the content types
Manual installation (without Symfony Flex)
### Register the bundle in `config/bundles.php` ### Register the Doctrine ORM mapping ### Register the routes ### Run the migration Create the `form_submission` table manually or copy the migration from the bundle and run it: ### Install the content typesConfiguration
Console Commands
| Command | Description |
|---|---|
ibexa:form-builder:install-content-types |
Creates or updates the content types required by the bundle (form, input, textarea, select, option, fieldset, horizontal_group, button, choice) |
ibexa:form-builder:sync-order |
Retroactively syncs the form_builder_order field value → location priority so the admin sub-item list reflects the intended field order |
Rendering a Form
Use any of the three identifiers to render a form from a controller or template:
You can render a form by passing its content ID, location ID or Form name:
Or link directly via the registered route:
Submission Handling
Set the submission_action field on your form content item to one of:
| Value | Behaviour |
|---|---|
store |
Saves the submission to the form_submission database table |
email |
Sends a notification email (requires notification_email field to be filled) |
both |
Stores the submission and sends the email |
Email fields on the form content item:
| Field | Description |
|---|---|
notification_email |
To address |
notification_email_cc |
CC address (optional) |
notification_email_bcc |
BCC address (optional) |
email_subject |
Email subject line (optional) |
Extending the Form Theme and Templates
Events
The bundle dispatches six events throughout the form submission lifecycle, giving you fine-grained control without needing to override any services. All event names are defined as constants on FormBuilderEvents.
| Constant | Dispatched | Cancellable |
|---|---|---|
PRE_VALIDATION |
After handleRequest(), before isValid() is evaluated |
✔ Cancelling prevents SubmissionHandler from running at all |
PRE_SUBMIT |
After POST data is cleaned, before any storage or email action | ✔ Cancelling skips both; listeners may also call setData() to enrich or sanitize the data |
PRE_STORE_SUBMISSION |
Before persist() + flush() |
✔ Cancelling skips the DB write; the email action still proceeds |
POST_STORE_SUBMISSION |
After flush(); entity carries its auto-generated ID |
✗ |
PRE_SEND_EMAIL |
After the Email object is built, before sending |
✔ Cancelling suppresses the send; mutate the Email object directly to change recipients, subject, or body |
POST_SUBMIT |
End of handle(), regardless of cancellations |
✗ Always fires; getSubmission() returns null when the store step was skipped |
Cancellable events expose cancel() and isCancelled(). Calling cancel() does not call stopPropagation(), so subsequent listeners on the same event still receive it.
Example: reject submissions that appear to be spam
Example: push every stored submission to an external CRM
Run Tests
This bundle uses Pest for testing.
Coverage Report
All versions of ibexa-form-builder-bundle with dependencies
ibexa/admin-ui Version ^4.4|^5.0
ibexa/core Version ^4.4|^5.0
doctrine/orm Version ^2.11|^3.0
doctrine/doctrine-bundle Version ^2.7
pagerfanta/pagerfanta Version ^3.0|^4.0
symfony/cache Version ^5.4|^7.0
symfony/console Version ^5.4|^7.0
symfony/event-dispatcher Version ^5.4|^7.0
symfony/form Version ^5.4|^7.0
symfony/framework-bundle Version ^5.4|^7.0
symfony/http-kernel Version ^5.4|^7.0
symfony/mailer Version ^5.4|^7.0
symfony/mime Version ^5.4|^7.0
symfony/routing Version ^5.4|^7.0
twig/twig Version ^3.0
guzzlehttp/promises Version ^2.3
nyholm/psr7 Version ^1.8