{"id":31721366,"url":"https://github.com/ecodev/formule","last_synced_at":"2025-10-09T03:48:26.173Z","repository":{"id":56980940,"uuid":"48731690","full_name":"Ecodev/formule","owner":"Ecodev","description":"TYPO3 Extension to render a variety of forms template based on the FE such as contact form, registration form, etc... effortless!","archived":false,"fork":false,"pushed_at":"2025-09-19T11:37:14.000Z","size":498,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-19T13:30:45.546Z","etag":null,"topics":["form","typo3","typo3-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ecodev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-12-29T06:30:59.000Z","updated_at":"2021-11-17T09:18:25.000Z","dependencies_parsed_at":"2025-09-19T13:13:47.707Z","dependency_job_id":"b3c028c0-32e2-4a34-b005-56a9afccf741","html_url":"https://github.com/Ecodev/formule","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/Ecodev/formule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ecodev%2Fformule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ecodev%2Fformule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ecodev%2Fformule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ecodev%2Fformule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ecodev","download_url":"https://codeload.github.com/Ecodev/formule/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ecodev%2Fformule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000703,"owners_count":26082911,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["form","typo3","typo3-extension"],"created_at":"2025-10-09T03:48:23.162Z","updated_at":"2025-10-09T03:48:26.167Z","avatar_url":"https://github.com/Ecodev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Formule for TYPO3 CMS\n=====================\n\nTemplate based, render a variety of forms such as contact form, registration form, etc... effortless!\n\nConsider these minimum steps to display a form and start submitting data:\n\n* Create a content element of type \"formule\" in the Backend.\n* Add some TypoScript configuration to declare a new HTML template.\n* Adjust your template in particular the form. Use a form generator of your choice.\n* Your form is basically ready.\n\n## Compatibility and Maintenance\n\nThis package is currently maintained for the following versions:\n\n| TYPO3 Version | Package Version | Branch  | Maintained    |\n|---------------|-----------------|---------|---------------|\n| TYPO3 11.5.x  | 4.x             | master  | Yes           |\n| TYPO3 10.4.x  | 3.x             | -       | No            |\n| TYPO3 8.x     | 2.x             | -       | No            |\n| TYPO3 7.x     | 1.x             | -       | No            |\n\n\nProject info and releases\n-------------------------\n\n\u003c!--Stable version:--\u003e\n\u003c!--http://typo3.org/extensions/repository/view/formule--\u003e\n\nDevelopment version:\nhttps://github.com/Ecodev/formule\n\n```shell script\ngit clone https://github.com/Ecodev/formule.git\n```\n\nNews about latest development are also announced on http://twitter.com/fudriot\n\nInstallation and requirement\n============================\n\nDownload the extension as normal in the Extension Manager or via Composer:\n\n```shell script\ncomposer require \"fab/formule\" \n```\n\nInstall the extension in the Extension Manager. \nYou are almost there! Create a Content Element of type \"formule\" \nin `General Plugin` \u003e `Variety of forms` and configure at your convenience.\n\n![](https://raw.githubusercontent.com/Ecodev/formule/master/Documentation/Backend-01.png)\n\nConfiguration\n=============\n\nThe plugin can be configured mainly in TypoScript. In the Extension Manager possible email redirection can be set according to the Application Context. This maybe useful when developing to avoid sending email to the final user.\n\nRegister a new template\n-----------------------\n\nBy default the extension provides a limited set of forms: a basic mail form along with a newsletter registration example. It is very likely you want to add new ones. To register a new template and see it in the plugin record, consider the two necessary steps:\n\n* Create a new HTML template `EXT:foo/Resources/Private/Plugins/Formule/MyForm.html`. You can take inspiration from the one in `EXT:formule`.\n* Add some minimum TypoScript settings, e.g. in `EXT:foo/Configuration/TypoScript/Plugin/tx_formule.ts`\n\n```\n\n\tplugin.tx_formule {\n\t\tsettings {\n\t\t\ttemplates {\n\n\t\t\t\t# Key \"1\", \"2\" is already taken by the extension.\n\t\t\t\t# Use key \"10\", \"11\" and following for your own templates to be safe.\n\t\t\t\t10 {\n\t\t\t\t\ttitle = Foo detail view\n\t\t\t\t\tpath = EXT:foo/Resources/Private/Templates/formule/ContactForm.html\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n```\n\n\nLoad additional assets\n----------------------\n\nBelow is a more complex example which will load additional JS / CSS. \nThis TypoScript could be written placed in a file, e.g. in `EXT:foo/Configuration/TypoScript/Plugin/tx_formule.ts`\n\n```\n\n    plugin.tx_formule.settings.template.11 {\n    \n        title = Newsletter subscription new\n        path = EXT:foo/Resources/Private/Standalone/Newsletter/NewSubscription.html\n\n        # Load custom assets\n        asset {\n        \n            0 {\n                path = EXT:foo/Resources/Public/Build/StyleSheets/formule.css\n                type = css\n        \n                # Optional key if loading assets through EXT:vhs.\n                dependencies = mainCss\n            }\n        \n            1 {\n                path = EXT:foo/Resources/Public/Build/JavaScript/formule..js\n                type = js\n        \n                # Optional key if loading assets through EXT:vhs.\n                dependencies = mainJs\n            }\n        }\n    }\n\n```\n\nPersist to the database\n-----------------------\n\nOne can also set a configuration to persist submitted data into the database.\nThis TypoScript could be written placed in a file, e.g. in `EXT:foo/Configuration/TypoScript/Plugin/tx_formule.ts`\n\n```\n\n    plugin.tx_formule.settings.template.11 {\n    \n        title = Newsletter subscription new\n        path = EXT:foo/Resources/Private/Standalone/Newsletter/NewSubscription.html\n\n        # Persist configuration\n        persist {\n            tableName = fe_users\n\n            defaultValues {\n                pid = 1\n                disable = 1\n            }\n\n            # Possibly process the values\n            processors {\n                0 = Fab\\Formule\\Processor\\UserDataProcessor\n            }\n\n            mappings {\n                # Left value corresponds to name in the form: name=\"firstName\"\n                # Right value corresponds to field name: fe_users.first_name\n                #first_name = first_name\n            }\n        }\n    }\n\n```\n\nLoading data\n------------\n\nTo pre-load data and inject values in the form, one can configure loaders. A Loader corresponds to a PHP class where one can fetch some data and return an array of values.\n\n```\n\n    plugin.tx_formule.settings.template.11 {\n    \n        title = Newsletter subscription new\n        path = EXT:foo/Resources/Private/Standalone/Newsletter/NewSubscription.html\n\n        loaders {\n            0 = Fab\\Formule\\Loader\\UserDataLoader\n        }\n\n    }\n\n```\n\nFinishers\n---------\n\nFinisher actions let you finalize the submit of your form and do whatever action is necessary. Your own finisher class must implement FinisherInterface.\n\n```\n\n    plugin.tx_formule.settings.template.11 {\n    \n        title = Newsletter subscription new\n        path = EXT:foo/Resources/Private/Standalone/Newsletter/NewSubscription.html\n\n        finishers {\n            0 = Fab\\Formule\\Finisher\\FooFinisher\n        }\n\n    }\n\n```\n\nHTML template\n-------------\n\nThe template has the bare minimum requirements. A Fluid form must be declared sending its content to action \"submit\". It is has one required field to retrieve the original Content element configuration `\u003cf:form.hidden name=\"values\" value=\"{contentElement.uid}\"/\u003e`. Formule has a mechanism to read and analyse the content. From that, it will extract allowed fields and mandatory values. Notice the basic structure with the inline comments.\n\n```\n    \n    \u003cf:form action=\"submit\" controller=\"Form\" additionalAttributes=\"{role: 'form'}\" method=\"post\"\u003e\n    \n        \u003cdiv class=\"form-group\"\u003e\n            \u003cinput type=\"text\"\n                   class=\"form-control\"\n                   id=\"name\"\n                   name=\"name\"\n                   value=\"{values.name}\"\n                   placeholder=\"{f:translate(key:'name')}\"\n                   required=\"required\"/\u003e\n        \u003c/div\u003e\n\n        \u003cinput type=\"submit\"/\u003e\n\n        \u003c!-- The only mandatory field --\u003e\n        \u003cf:form.hidden name=\"values\" value=\"{contentElement.uid}\"/\u003e\n\n        \u003c!-- VH to limit bots annoyance (required) --\u003e\n        \u003cfo:honeyPot/\u003e\n\n        \u003c!--Display hint in Development context (optional) --\u003e\n        \u003cfo:message.development/\u003e\n    \u003c/f:form\u003e\n```\n\nSections in template\n--------------------\n\nThe template can be \n\n\n```\n\n    # Required section\n    \u003cf:section name=\"main\"\u003e\n        Content of the template\n    \u003c/f:section\u003e\n```\n\nThis section is optional and is to define the body part of the email to the admin. If present if will replace the value from the flexform.\n\n\n```\n\n    \u003cf:section name=\"emailAdmin\"\u003e\n    \n    \u003c/f:section\u003e\n```\n\nSame as above but for the end user. If present if will replace the value from the flexform.\n\n```\n\n    \u003cf:section name=\"emailUser\"\u003e\n    \n    \u003c/f:section\u003e\n```\n\nThis section is optional and is to define the feedback message for the end user after successfully submitting the form.\n\n```\n\n    \u003cf:section name=\"feedback\"\u003e\n    \n    \u003c/f:section\u003e\n```\n\nTemplate variable\n------------------\n\nFor convenience sake, the extension provides a bunch of global variables than can be used across emails (subject or body part):\n\n* {HTTP_HOST} : www.example.org\n* {HTTP_REFERER} : http://www.example.org/example/\n\nFields control\n--------------\n\n* The extension ships a honeypot View Helper to reduce bot annoyances.\n* The fields marked as `required=\"required\"` will be extracted and controlled as such.\n* Todo: we could introduce the HTML5 attribute `pattern=\"\"` for better field control (not yet implemented).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecodev%2Fformule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecodev%2Fformule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecodev%2Fformule/lists"}