ulion / jsonform

Build forms from JSON Schema. Easily template-able. Compatible with Twitter Bootstrap out of the box.
http://ulion.github.io/jsonform/playground/
MIT License
49 stars 27 forks source link

support for oneOf, anyOf based on JSON Schema Draft 4 #4

Open gpetrov opened 9 years ago

gpetrov commented 9 years ago

Any plans or progress on working for support of oneOf, anyOf, allOf and not directives based on JSON Schema Draft 4?

ulion commented 9 years ago

the validation library support those, but how would jsonform to render form items with such types?

2015-01-16 21:48 GMT+08:00 George Petrov notifications@github.com:

Any plans or progress on working for support of oneOf, anyOf, allOf and not directives based on JSON Schema Draft 4?

— Reply to this email directly or view it on GitHub https://github.com/ulion/jsonform/issues/4.

Ulion

gpetrov commented 9 years ago

well easy, justlike the https://github.com/jdorn/json-editor implemented them. When you see a oneOf option for example you render an extra drop down to let the user choose the type first and then render the right oneof group. Or even easier is to provide a link of the type to other field and then dependng of its value render the oneof

ulion commented 9 years ago

Got it, oneOf is somehow like the type selectfieldset we currently have, we can support that if so.

The most interesting feature I saw from json-editor is the arraytable, which there was ever some jsonform branch tried to do that. if someone can pick it up, it will be great.

json-editor also support the change event driven template values, and different themes to use with different ui library. I have to say, it must has some better design there we can learn. currently jsonform is tightly bound with bootstrap and the template part of code is quite not easy to do with.

2015-01-17 18:59 GMT+08:00 George Petrov notifications@github.com:

well easy, justlike the https://github.com/jdorn/json-editor implemented them. When you see a oneOf option for example you render an extra drop down to let the user choose the type first and then render the right oneof group. Or even easier is to provide a link of the type to other field and then dependng of its value render the oneof

— Reply to this email directly or view it on GitHub.

Ulion