- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Thu, 15 Feb 2024 17:30:13 -0800
- To: Steven Pemberton <steven.pemberton@cwi.nl>
- Cc: XForms <public-xformsusers@w3.org>
- Message-ID: <CAAc0PEVJtw=WkXdywTNrCumNy+gTos6z7=diOHGrn0BgBU74hg@mail.gmail.com>
That sounds reasonable to me! On Fri, Feb 9, 2024 at 2:13 PM Steven Pemberton <steven.pemberton@cwi.nl> wrote: > > Following on from our meeting, where Erik pointed out that we could do > this > with an @appearance attribute on <input/>, it seems to me that > appearance="minimal" would do the trick. > > <input ref="amount" appearance="minimal"/> > > would display the amount as if it were an <output/>, unless the control > got > focus, in which case it would be displayed as an input. > > Steven > > > > On Friday 02 February 2024 13:07:51 (+01:00), Steven Pemberton wrote: > > > 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, 16 February 2024 01:30:30 UTC