- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Mon, 28 Nov 2016 10:38:54 +0100
- To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_constraint_Property
Has this text:
"Note:
Specifying minimum and maximum occurrences for nodes in the instance data
can be achieved by using the count() function within a constraint
property."
I'd like to convert this note into an example.
So, I assume what is meant is that you can do something like this:
<bind ref="wishes" constraint="count(wish)<4"/>
However, I'm not sure when this would show up, except with a submit.
If you do a repeat:
<repeat ref="wishes/wish">
<input ref="."><label>What is your wish?</label></input>
</repeat>
the repeat wouldn't stop you adding new wishes.
Can anybody think of a good example?
Steven
Received on Monday, 28 November 2016 09:39:36 UTC