[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/src/zope/schema -_bootstrapfields.py:1.19.2.1

Shane Hathaway shane@zope.com
Mon, 28 Jul 2003 11:43:25 -0400


Steve Alexander wrote:
> 
>> I'd like to understand where this leaves us.
>>
>> The idea of a field being required is good in theory, but certain UI 
>> constraints change the meaning of 'required' in a form (both in a 
>> browser and in a GUI.)  For example, it's impossible to apply 
>> 'required' to a checkbox--checkboxes have only two states.
> 
> 
> An MFC checkbox can have three states. For example, it can start out 
> grey indicating "neither checked nor unchecked". A required checkbox 
> must be moved out of that initial state in order to proceed.

True, and this could be emulated with Javascript, but UI designers 
rightfully avoid this feature.  It has no parallel with paper forms so 
it confuses people.  It's usually better to implement a tri-state widget 
using a drop-down selector.

> I'll need to think about this a lot more before I can say whether I 
> agree or disagree :-)

FWIW, Tres pointed out an exception to my rule: if no form has been 
submitted to change a non-required text field from its initial state, 
that field may have a missing value.

Shane