You don't have to 'install' anything as you can see in the
testsuites; all formwidgets should work as they are here, online.
To use them yourself
you just add the CSS and XBL to your XUL. Generally, you
add the FormWidgets folder to your application
include the FormWidgets.css in the XUL where you need it
bind some XUL elements to the 'formwidget' class
Sending Forms
To take a set of formwidgets and send their contents through HTTP,
you use a formbutton.
A formbutton is itself not a formwidget, but it utilizes formwidgets
for HTTP Requests. To get one, you
bind a XUL button element to the 'formbutton' class
In order to send the data, you pass a XUL element to the submit
method of the formbutton. The element should contain
all the formwidgets you want submitted. For example:
A click on the button will now traverse the parentnode (the box),
find only the textbox formwidget, do a http query for
test.cgi?test=OK and alert the response from the server.
In this example, the button uses a synchronized GET request,
the default.
Note that it is the button that sends the data.
This is different from HTML, where the
'container element' (a form) appears to send its own content.
In this project, there is no FORM element.
Letting the button send the data makes more sense
and has some practical advantages. In short, the data to
process is separated from the logic of processing it.
Also note, the elements have more then the usual attributes
and methods. For example, the textbox of class 'formwidget' has
a new attribute "name". These are the extensions defined in XBL.
The details for each element are explained in the chapter of
each element.