In the first part of this series, I gave you a quick introduction to the newly-released XForms 1.0 specification, by explaining the fundamental concepts of the XForms model. Now that you know the basics, find out how to submit XForms data to a server-side script or save it to a local client file, and also read about how XForms can integrate with XML Schemas to simplify input validation.
In the first part of this series, I gave you a quick introduction to the newly-released XForms 1.0 specification, by explaining the fundamental concepts of the XForms model. I showed you how to define an XForms model and form instance data, as well as the logical components that govern how the form behaves on user interaction. I also took you on a whirlwind tour of the various input controls available in XForms 1.0 - as you will have seen, these controls correspond closely with the controls available in traditional HTML, and then some.
Now, all this is fine and dandy, but how about submitting the form and actually doing something with the user's data? Well, that's where this article comes in. Over the next few pages, I'm going to answer this vexing question, showing you how to handle form submissions on both the server and the client. XForms offers the creative developer an immense amount of control over the process, primarily by doing away with the traditional name=value submission format in favor of standard XML markup for user data.
I won't just stop there, though. Once you've understood how to store user data on the server with XForms, I'll show you how to control the quality of that data by having XForms validate user input at the time of submission. As you'll see, XForms' built-in support for data validation means you don't need JavaScript or server-side logic any more. Instead, you can quality-control user input through built-in XForms constructs, or - if you want to get really advanced - hook your XForms up to an XML Schema to enforce more sophisticated validation and typing rules.