{"id":15287379,"url":"https://github.com/zikula/dynamicformbundle","last_synced_at":"2026-02-18T06:31:17.933Z","repository":{"id":37487102,"uuid":"481971400","full_name":"zikula/DynamicFormBundle","owner":"zikula","description":"Symfony bundle with helpers for handling dynamic form fields.","archived":false,"fork":false,"pushed_at":"2023-09-15T20:04:45.000Z","size":213,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-12T08:39:21.991Z","etag":null,"topics":["bundle","doctrine","dynamic","form","form-builder","form-generator","form-maker","forms","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zikula.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"craigh"}},"created_at":"2022-04-15T13:43:01.000Z","updated_at":"2025-01-07T15:26:39.000Z","dependencies_parsed_at":"2024-10-14T18:21:13.199Z","dependency_job_id":null,"html_url":"https://github.com/zikula/DynamicFormBundle","commit_stats":{"total_commits":94,"total_committers":1,"mean_commits":94.0,"dds":0.0,"last_synced_commit":"efd45cb882f1dbb937d60ff03e8a8b029a2b68d5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikula%2FDynamicFormBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikula%2FDynamicFormBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikula%2FDynamicFormBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikula%2FDynamicFormBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zikula","download_url":"https://codeload.github.com/zikula/DynamicFormBundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247425597,"owners_count":20936979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","doctrine","dynamic","form","form-builder","form-generator","form-maker","forms","php","symfony","symfony-bundle"],"created_at":"2024-09-30T15:27:59.462Z","updated_at":"2026-02-18T06:31:17.927Z","avatar_url":"https://github.com/zikula.png","language":"PHP","funding_links":["https://github.com/sponsors/craigh"],"categories":[],"sub_categories":[],"readme":"DynamicFormBundle\n=================\n\n![Build Status](https://img.shields.io/github/workflow/status/zikula/DynamicFormBundle/Symfony)\n[![codecov](https://codecov.io/gh/zikula/DynamicFormBundle/branch/main/graph/badge.svg?token=9BIL3EQ5IK)](https://codecov.io/gh/zikula/DynamicFormBundle)\n![License](https://img.shields.io/github/license/zikula/DynamicFormBundle)\n\nThe `DynamicFormBundle` offers helpers for handling dynamic form fields (forms built from definitions stored in\nthe database). This can be helpful for several applications where a site admin (not the developer) needs to configure\nthe fields of a form, like contact forms, surveys or exams, employment applications, etc.\n\n#### [An example SurveyMaker application is available](https://github.com/zikula/DynamicFormBundleExample).\n\nInstallation\n============\n\nMake sure Composer is installed globally, as explained in the\n[installation chapter](https://getcomposer.org/doc/00-intro.md)\nof the Composer documentation.\n\nApplications that use Symfony Flex\n----------------------------------\n\nOpen a command console, enter your project directory and execute:\n\n```console\n$ composer require zikula/dynamic-form-bundle\n```\n\nApplications that don't use Symfony Flex\n----------------------------------------\n\n### Step 1: Download the Bundle\n\nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n\n```console\n$ composer require zikula/dynamic-form-bundle\n```\n\n### Step 2: Enable the Bundle\n\nThen, enable the bundle by adding it to the list of registered bundles\nin the `config/bundles.php` file of your project:\n\n```php\n// config/bundles.php\n\nreturn [\n    // ...\n    Zikula\\Bundle\\DynamicFormBundle\\ZikulaDynamicFormBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\nGetting Started\n---------------\n\nIn order to implement this bundle, the developer must create three entities:\n\n1. A 'container' Entity that holds both:\n   1. The form specifications (OneToMany)\n   2. The response data (OneToMany)\n   3. This _may_ extend `AbstractSpecificationContainer`\n2. A 'wrapper' Entity that defines the form specification.\n   1. This **must** extend `AbstractFormSpecification`\n3. A 'response' Entity to contain the data responses to the forms.\n   1. This **must** extend `AbstractResponseData`\n\nForm Creation: the 'Building' form\n----------------------------------\n\nThe `Zikula\\Bundle\\DynamicFormBundle\\Form\\Type\\FormSpecificationCollectionType` formType is a collection of Form\nSpecifications in your form. You must define the `entry_type` to be your own 'wrapper' Entity (item 2 above). Each\nmember of the collection provides a form type to define all the needed details of a formType (a `FormSpecification`).\nForm options are loaded using ajax and dynamically added/replaced in the form.\n\n```php\n    $builder\n        -\u003eadd('questions', FormSpecificationCollectionType::class, [\n            'entry_options' =\u003e [\n                'data_class' =\u003e Question::class // required\n            ],\n        ])\n```\n**IMPORTANT NOTE**: The Javascript for these actions is automatically loaded. However, the javascript is jQuery-based.\nTherefore, **you must include jQuery in your front-end assets.**\n\nForm Creation: The 'Responding' form\n------------------------------------\n\nThe bundle also provides the `Zikula\\Bundle\\DynamicFormBundle\\Form\\Type\\DynamicFieldsType` formType. This\nprovides for inclusion of the defined dynamic fields. The formType requires the `specificationContainer` object.\nThis object implements `Zikula\\Bundle\\DynamicFormBundle\\Container\\SpecificationContainerInterface`. This can be your\n'Container' object (item 1 above) or possibly another provider like a Repository. The object must provide a list of form\nspecifications (as defined by the 'wrapper' class). This list can be optionally sorted or filtered as required.\n\nExample:\n\n```php\n    $builder-\u003eadd('survey', DynamicFieldsType::class, [\n        'specificationContainer' =\u003e $myContainer,\n    ]);\n```\n\n### More information\n\n - see [Additional Documentation](docs/index.md)\n - This bundle suggests [scienta/doctrine-json-functions](https://github.com/ScientaNL/DoctrineJsonFunctions)\n   - You must configure the DoctrineJsonFunctions bundle at the application level. It is not done automatically.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikula%2Fdynamicformbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzikula%2Fdynamicformbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikula%2Fdynamicformbundle/lists"}