W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] suggestion

From: Judah Frangipane <judahf@fmtcs.com>
Date: Tue, 08 Jun 2004 18:38:41 -0500
Message-ID: <40C64E01.4050303@fmtcs.com>
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
Received on Tuesday, 8 June 2004 16:38:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC