- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Fri, 02 Feb 2024 12:07:51 +0000
- To: XForms <public-xformsusers@w3.org>
I have a use case in an app I am writing. Actually, it arises a lot.
The idea is that the standard display is just the output, but if I want to
change a value, I focus on the value, change it, and then focus away.
Well, you can do this in XForms:
<switch>
<case id="out">
<trigger appearance="minimal">
<label><output ref="."/></label>
<toggle ev:event="DOMFocusIn" case="in"/>
</trigger>
</case>
<case id="in">
<trigger appearance="minimal">
<label>
<input ref=".">
<toggle ev:event="DOMFocusOut" case="out"/>
</input>
</label>
</trigger>
</case>
</switch>
This works, and does what I want, but to be honest, is a lot of code for a
simple use-case.
So this is a strawman proposal for
<outin ref="."/>
to replace the above. Name is open to discussion.
It would otherwise be a normal control, with label, hint, help, etc.
Steven
Received on Friday, 2 February 2024 12:08:02 UTC