form-js / forms.js

Fully featured javascript form builder
https://formsjs.io/
8 stars 4 forks source link

Global settings to define defaults for all different fields #35

Closed Trilmatic closed 3 months ago

Trilmatic commented 5 months ago

We could create some global definitions that would allow to one time configure of the forms.js. It would allow to pass overwritten defaults and any other things needed for the fields so there is not need to pass it into each field.

Additionally this could also allow to define input versions based on settings, so instead if having to type all default settings you could just define sub input like text-custom that would auto initialize with certain defaults and settings.

Why would this be useful? If I have a custom icon that I want for the input currently I would have to pass this long string or URL or something into each input I would want with the icon. That would be annoying and clutter the code. Instead I could define default one time in main.js similar to how license is now works. Any initialization of the field would then pull the custom defaults if available.

Trilmatic commented 4 months ago

This should be done before 1.1.0