W3C home > Mailing lists > Public > public-xformsusers@w3.org > December 2016

ACTION-2094 - Produce example for xforms-next

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Thu, 01 Dec 2016 11:43:36 +0100
To: public-xformsusers@w3.org
Message-ID: <op.yrsf2y2gsmjzpq@steven-aspire-s7>
So here's a use-case. You have to fill in a number of fields in a repeat,
each field is 4 chars long, and when you have typed the 4 characters, you
will be automatically taken to the next field.


     <model xmlns="http://www.w3.org/2002/xforms">
	<instance>
             <data xmlns="">
                 <name/>
                 <entry/><entry/><entry/><entry/>
             </data>
         </instance>
     </model>
     ...
     <repeat ref="entry">
         <input ref="." incremental="true()" id="here" label="4 chars:">
             <dispatch
                 ev:event="xforms-value-changed"
                 name="xforms-next"
                 targetid="here"
                 if="string-length(.)=4"/>
         </input>
     </repeat>
     <input ref="name" label="Your name"/>

Steven
Received on Thursday, 1 December 2016 10:44:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:47 UTC