Closed mmilkin closed 8 years ago
Added two top level methods IForms.json() this will return the form in a json format IWIdget.json_data() this will return a dictionary representation of the widget.
{'errors': [<Form Level Errors> ...], 'fields': [<Widgets.json_data()> ...], 'mode': '<Form Mode>', 'prefix': '<Form Prefix>', 'status': '<Form Status>'}
{'error': 'Widget Error Message', 'id': '<Widget Id if it has one>', 'mode': '<Widget input>', 'name': '<Widget Name>', 'required': <Widget Required>, 'type': 'text', 'value': '<Widget Value>'},
Looks good, thanks. I have merged it. Sorry for the long wait (almost a year)!
JSON Forms
What: This pull request will allow users to render zope forms to a json format.
Added two top level methods IForms.json() this will return the form in a json format IWIdget.json_data() this will return a dictionary representation of the widget.
Examples
Form:
Widgets: