abcd-j / schema-form

https://abcd-j.github.io/schema-form/
MIT License
0 stars 0 forks source link

Explore callback function specification #5

Open jsheunis opened 7 months ago

jsheunis commented 7 months ago

A possibly powerful option to allow custom functionality wrapped inside a standard template would be with json-editor's callback options. It is possible to pass function references to the form config in relation to specific events and components. This means a form implementer would be able to provide custom javascript code in a standalone file and pass this along with the config (containing the function references) to the form renderer. A use case could be to check an online endpoint for derivative information related to the value in a specific field in the form (e.g. ontology lookup), or to display a button upon form validation that, when clicked, would push the form payload to some endpoint. This should be explored.