CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Allow JSONForm field schema to directly write to field render settings #315

Closed FilipNest closed 7 years ago

FilipNest commented 7 years ago

Controversial but it's such an annoying part of JSONForm I got tired of hacking around it and put this in. The old way still works so the JSONForm docs still apply, but I've added a new setting to a JSONForm field schema called renderSettings. Anything passed in to that gets merged with the form object when the form is rendered (even if one hasn't been defined).

This means you can define all the JSONForm stuff you need directly, classes etc, in the same object if you want.

Is finally allowing us to get rid of the schema vs display seperation a bad idea? I understand why JSONForm tries it, it just isn't managable on complex dynamic form fields. As we've found time and time again.