menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

JSONForms

JSON Forms is a JSON Schema based approach for creating forms and comes with support for React, Angular and Vue. Support here is free, but might involve some delay in the replies based on our current workload for paying customers. We also offer PROFESSIONAL SUPPORT packages to get you started quickly with JSON Forms and to help you with any questions and technical difficulties for JSON Forms with guaranteed response time and in-depth technical solutions. For details please see our web page linked below.

Channels
Team

Multiple Forms (Angular)

August 10, 2020 at 1:07pm

Multiple Forms (Angular)

August 10, 2020 at 1:07pm
Hi, I've seen you have a support for multiple forms, but at the end of the day it still is one form, isn't it? I would like to know am I capable of generating several forms with different state in one application. From what I found out I can add several instances and they will be rendered but with the same state. If I try to use the wrapper component for the form and call it multiple times it will only render one. I don't wait for the straight answer on how to do it but at least direction on how you manage state, if you use redux in angular as well and if I can change the behavior of state management. Thanks beforehand

August 10, 2020 at 11:42pm
Hi , By default we provide one instance of the JsonFormsAngularService, see this line: https://github.com/eclipsesource/jsonforms/blob/a2254ef52787828430ea54d5bd60ab16e130bc09/packages/angular/src/jsonforms.service.ts#L26 To my understanding you must explicitly define the use of this service per Component to get individual instances, see https://angular.io/guide/providers#limiting-provider-scope-with-components