this is a test page for xforms snippets. I have been looking into xforms and have found that simple working examples are a bit thin on the ground. So as I learn a bit about it I am going to put samples here.
This page works really nicely in firefox, unfortunaly not all of the samples do. xsmiles is my current referance browser for the forms themselves.
If you have any advice or find these useful then please let me know (link in footer)
This was the first thing I implemented with xforms, on the way to the multi select example
this is the end result of the first common issue that I tried to address with xforms, having a second level select box with values depending on what is in the first
Once I had the above samples working I thought I would see if I could call in data from an external data source
This is really easiliy done, in the example below I have called in the site menu and created a select box with all of the items in the menu
Binding makes xforms simple it helps you cleanly seperate the model from the form
The example below is the same as the one above but with bound elements instead of inline refs
Not only can you use binding to bind form elements to instance data you can also bind constraints to the instance data
In the example below there are 3 text boxes they will contain invalid data (which should be styled differently) if they don't contain numbers and appear in decending order
Xsmiles at lest (and possibly other implementations) will give different widgets for input elements that are bound with certian types