[whatwg] suggestion

Judah Frangipane judahf at fmtcs.com
Tue Jun 8 16:38:41 PDT 2004

Dean Edwards wrote:

> Judah Frangipane wrote:
>> I agree. The rank order makes sense.
>> Bu what about if you have a field,
>> Input name=record:
>> Have you ever been arrested Yes O No O
>> Input name=record_when:
>> If yes when [_________________]
>> How would you make record_when required if checkbox equals yes?
> record_when is always required. it is disabled until you select "yes".

ok. so when a user selects "yes" how does record_when get enabled? would 
you use javascript? if so then there is no advantage to xforms. let's 
say that you have 3 options, single, married and celabate. let's say 
someone picked the one choice on accident and then changed it and picks 
another choice. could you enable one fieldset and disable the other two? 
is there something in xforms to handle that? fyi, i've skimmed through 
the information about 2 or 3 times reading various parts but i still 
haven't found a solution to this or how you suggest to enable fields 
using xforms (unless you are suggesting to enable them through 
javascript). if not there should be conditional requirements where you 
input x is only required if input y is filled in or input y equals z.

> this is a classic gui scenario. enable/disable sub-sections of a form 
> in light of previous data entry. i don't think the spec needs to be 
> altered because of scenarios like this. some client-side logic 
> (javascript) will suffice.
> -dean

More information about the whatwg mailing list