Liform | PHP library to render Symfony Forms to JSON Schema | JSON Processing library
kandi X-RAY | Liform Summary
kandi X-RAY | Liform Summary
Liform is a library for serializing Symfony Forms into [JSON schema] It can be used along with [liform-react] or [json-editor] or any other form generator based on json-schema. It is used by [LiformBundle] but can also be used as a stand-alone library. It is very annoying to maintain backend forms that match forms in a client technology, such as JavaScript. It is also annoying to maintain a documentation of such forms. And error prone. Liform generates a JSON schema representation, that serves as documentation and can be used to document, validate your data and, if you want, to generate forms using a generator.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Gets the form values .
- Adds the minimumLength field to the schema .
- Resolve the transformer for a form .
- Transform multiple choices .
- Recursively convert form data to array .
- Guess the minimum length for a given constraint .
- Add description .
- Find data class for given form type
- Add extension .
- Configures the options .
Liform Key Features
Liform Examples and Code Snippets
Community Discussions
Trending Discussions on Liform
QUESTION
I have a component which renders multiple forms based on schema, and the problem is that I will change the schema, I will rerender the forms, and the state cannot keep.
The code looks like the following:
...ANSWER
Answered 2018-Feb-25 at 10:55based on the redux-form api you can pass a prop
destroyOnUnmount={false}
to you form component. or in you reduxForm() initialization
i have used it myself and it keeps the form state on re-render
https://redux-form.com/7.2.3/docs/api/reduxform.md/#-code-destroyonunmount-boolean-code-optional-
QUESTION
I'm trying to generate a JSON of my form type in my controller using liform or liform-bundle but got the error :
CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedMethodException: "Attempted to call an undefined method named "getBlockPrefix" of class "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy"." at /home/admin/Documents/displayce/code/vendor/limenius/liform/src/Limenius/Liform/FormUtil.php line 39
the code in my controller :
...ANSWER
Answered 2017-Sep-01 at 05:08add a getBlockPrefix to your formType and targeting type like this :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Liform
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page