Download the PHP package precision-soft/symfony-json-form without Composer
On this page you can find all versions of the php package precision-soft/symfony-json-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download precision-soft/symfony-json-form
More information about precision-soft/symfony-json-form
Files in precision-soft/symfony-json-form
Package symfony-json-form
Short Description forms that serialize to json for frontend frameworks with symfony api backends
License MIT
Homepage https://github.com/precision-soft/symfony-json-form
Informations about the package symfony-json-form
Symfony json form
You may fork and modify it as you wish.
Any suggestions are welcomed.
Purpose
The purpose of this library is to create forms for single page applications, with a symfony backend. The forms are constructed in the backend and serialized to json, that can be rendered in the frontend. In the assets folder you can find a react component to render the form. There are 2 versions of the form:
- formV1, is the original react components for rendering the form, kept for backwards compatibility.
- formV2, the new components and the recommended way to render the json.
Usage
Add this to your services.yaml.
React
Use the components from ./assets/react folder to interpret the backend response. The Config component is project specific. For me, it holds the locale context of the application. It is integrated with:
willdurand/js-translation-bundlefor the Translator.friendsofsymfony/jsrouting-bundlefor the UrlGenerator.
Dev
Todo
- Render and handle complex types like \DateTime.
- Unit tests.
All versions of symfony-json-form with dependencies
symfony/http-foundation Version 7.*
symfony/serializer Version 7.*
symfony/translation-contracts Version 3.*