icook / yota

Flexible Python web forms with asynchronous validation
Other
33 stars 3 forks source link

Data submission from disabled nodes throws DataExceptionError #71

Closed ericecook closed 11 years ago

ericecook commented 11 years ago

A disabled form element will submit nothing. This then causes a DataExceptionError to be raised because Yota expects to find the node in the submission data.

I'm not sure the best way of fixing this. A couple things come to mind.

  1. It could be setup so that yota catches whether or not 'disabled' is passed to a node and allows a submission to return without that node. Although this is still pretty brittle, because a user may well decide to disable an element with js after rendering the form.
  2. Another solution might be to by convention include a hidden input field for each disabled field, although this seems pretty annoying imo.
  3. Or have Yota not throw an exception on failing to get all nodes back. This seems simplest, but opens up the possibility for someone to potentially have a hard time figuring out certain mistakes
icook commented 11 years ago

This will be fixed in 0.2.3 with removing the DataExceptionError completely.

ericecook commented 11 years ago

WIll be resolved with Issue #74