Re: Form element dependencies

On Sat, Mar 14, 2015 at 4:12 PM, Andrea Rendine
<master.skywalker.88@gmail.com> wrote:
> The idea is quite good and as I said before it allows authors building forms
> which not only display/hide some elements when unnecessary (i.e. when they
> depend on other elements which haven't been selected), but in such a way
> that form validation applies nonetheless.
>
> Just one note:
> 1. maybe a brand-new attribute name should be used. @for is already
> specified on label and output elements with very different meanings, so I
> believe it would be too much.

I'm not sure that a new attribute would add any value over putting
@for to use where there currently is none. The use of @for on <label>
and <output> is that of building associations between elements which i
think is the same use case albeit with specific semantics based on the
checked/selected-ness of the field. I think the question to validate
this idea is - what else could @for be used for on inputs if not this
use case?

> 2. maybe elements or fieldsets could depend also on <option> elements inside
> a <select>? Or would it be too difficult/useless?

Yes, i think this is definitely a good idea. It would allow field/sets
to be enabled for specific options.


Cameron

Received on Tuesday, 17 March 2015 13:37:16 UTC