What's wrong with HTML Forms?When programming for the Web, I frequently find myself doing the same things over and over: creating a form that matches my database, preloading the fields in the form from a record, and writing the JavaScript to make my particular application work. With the help of <cfform> and some custom tags that implement cool behavior such as date pickers and pseudo-combo boxes, I can eventually get my forms to work the way I want them to, but I find myself developing the same code over and over for each new application. In addition, my forms need to submit to a page that know exactly what the fields on my form were, and generate new forms that contain the same data with slightly different behaviors depending on what stage of workflow the data is in. For example, creating a press release page, where the person who assigns the task of writing, the author, the editor, and the person responsible for final approval all see the same data, but can edit different parts of it, requiring a lot of conditional logic to make the form do all the different things its got to do (or redeveloping the form four times.) The idea of XForms is to take what's been learned from years of using HTML forms, and create a new type of forms that's more generally applicable. The primary improvements of XForms, as outlined in the W3C's XForms Recommendation (see http://www.w3.org/TR/XForms/) are:
|