- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Tue, 16 Jan 2018 09:08:06 -0800
- To: Steven Pemberton <steven.pemberton@cwi.nl>
- Cc: XForms <public-xformsusers@w3.org>
> However, I'm not convinced by this line of reasoning, for these reasons:
>
> * <trigger/> and <submit/> are closely related.
> * You can only submit data if it is valid, relevant, and non-empty if
> required.
> * You *can* submit data that is readonly.
True, but the relevance or readonliness of the `<submit>` is not
necessarily related to that of the submission:
<submission ref="instance('my-data-instance')">
<submit ref="instance('my-control-instance')/submit">
> I stumbled on this problem when I was writing code like this:
>
> <trigger ref="value" label="Add">
> <insert ref="list" origin="value" ev:event="DOMActivate"/>
> </trigger>
>
> clearly I don't want to do anything with 'value' if it is invalid, etc, but
> I have to go to a lot of extra work to disable the trigger in those cases.
It seems to be very specific to this scenario. I can imagine, in a
repeated list, for example, a "copy" button which works to copy data
from one row to the other even if it is invalid.
This said, I am not particularly happy to use `readonly` to disable
controls. I think there has been discussions in the past about this.
The notion that a control is disabled should ideally be separate.
`readonly` could imply `disabled` in some cases. But often I would
like to just write:
<trigger disabled="some condition here">
or, if `disabled` was a MIP:
<bind disabled="some condition here">
-Erik
Received on Tuesday, 16 January 2018 17:08:49 UTC