json-forms icon indicating copy to clipboard operation
json-forms copied to clipboard

unable integrate dynamic schemas with initial data

Open MSSoumya opened this issue 8 years ago • 1 comments

I am trying to create a form in which I require the array to have a dynamic schema for a certain field. I tried this by combining http://brutusin.org/json-forms/#3 and http://brutusin.org/json-forms/#0 , the schema, data and resolver for which are here.

Am I doing it wrong ? Is there any alternate way in which I can achieve what I'm trying to do ? If so please help. Thanks.

MSSoumya avatar Jun 07 '17 08:06 MSSoumya

Hi @MSSoumya your schema resolver does not produce the schema entries needed. The form is asking the resolver for "$.events-info[#].subspecies", so the schemas object passed to the callback must contain an schema for this entry. I can see this is a sample schema, but have in mind that given your schema definition, this schema is the same for all array entries.

If you post your real needs I could help you better.

Cheers

idelvall avatar Jun 07 '17 09:06 idelvall