grayed out/conditional form selections

P. Raghavan Menon (rmenon@socrates.tisl.ukans.edu)
Wed, 10 Jan 1996 00:30:50 -0600 (CST)


From: "P. Raghavan Menon" <rmenon@socrates.tisl.ukans.edu>
Message-Id: <199601100630.AAA09682@socrates.tisl.ukans.edu>
Subject: grayed out/conditional form selections
To: www-html@w3.org (HTML)
Date: Wed, 10 Jan 1996 00:30:50 -0600 (CST)

Hi,

I was wondering if there are any ideas/plans to implement
grayed out/conditional forms. I went through the FAQ and searched
through the list archives for keywords that seemed relevant but
there seems to be no mention of this.

What I was thinking of is something like this:

<FORM METHOD=post ACTION="http://www.hal.com/sample">
<P><input name="gender" type=radio value="male"> Male <P>

<CONDITIONAL "gender"="male">
   We have a fine selection of ties for the well dressed man.
   What kind would you be interested in ?<p>
   <input name="tietype" type=checkbox value="flashy"> Look at me!<p>
   <input name="tietype" type=checkbox value="subdued"> Subdued.<p>
</CONDITIONAL>

<P><input name="gender" type=radio value="female">Female 

<CONDITIONAL "gender"="female">
  The latest from the fashion centers of the world. What
  would you be interested in ? <p>
  <input name="fashion" type=checkbox value="spring"> Spring Fashions<p>
  <input name="fashion" type=checkbox value="winter"> Winter Fashions<p>
  <input name="fashion" type=checkbox value="summer"> Summer Fashions<p>
</CONDITIONAL>
  
<P><INPUT TYPE=SUBMIT> <INPUT TYPE=RESET>
</FORM>

The text inside the <CONDITIONAL></CONDITIONAL> statements is
grayed out (and form options inside it can't be selected) unless
the specified condition is met. I am not familiar with browser code
so can't say if it would be very inefficient to implement (seems simple
especially since we are only graying out areas), but it would be a
really useful feature to have.

Of course, the "condition" could be extended to include various
boolean operators if required, like
<CONDITIONAL "gender"="male" or ("something"="something_else" and "x"="y")>

-- 
Raghavan ============ rmenon@tisl.ukans.edu or rmenon@engr.ukans.edu