>InputEx uses no html (it is the opposite of unobtrusive librairies): all the fields and forms are configured using json, then rendered by manipulating the DOM.
i wonder if it's too ambitious to attempt to define any kind of markup/
template to construct the layout in a flexible way. there could be two
different scenarios
- for simple case, the whole form could be rendered by inputEx. In
long term, a JavaScript template solution could be used. As a form and
fields are defined, it's possible to make a Dialog ( a series of form/
page). Like this:
http://www.bubbling-library.com/eng/api/docs/plugins/wizard-examples.html
- for cases that require advanced layout, users define their own
layout, and assign ID for every field (and the form). A form is
defined in JSON by inputEx, the definition could do progressive
enhancement of the fields, setting default value(optional), add
validation, and some kind of interaction. In this usage scenario,
inputEx only transform some HTML elements (just like YUI Editor turn a
textarea to an editor) and add behavior to them, without altering the
layout.
for the 2nd case, i actually expect the form definition, validation
rules be defined on the server-side. (for Java, it's pretty easy to
transform objects to Json)
i have a form on hand to add validation and some server interaction
functionality. The form is made from Accordion example:
http://www.i-marco.nl/weblog/yui-accordion/form/ . Ideally, inputEx
should utilize the accordion widget to create the form but in short
term, it would be more realistic to directly use HTML to create the
form and use inputEx to manage the other aspects like validation.
That's why I come up with the two usage scenarios
regards,
mingfai