The main goal is to isolate the aspect of the overall form, by the configuration of single items of the form. The variable that is passed as first argument to Layout will hold all information on which are the widgets (graphical/input entieties) we want to display in the form.
General options ca be passed when creating the new instance of the class, via conf method or when shwo/create method is called.
the creation of a widget is triggered by the presence of a 'namé, a modifier will force the type (default is input type).
A modifier can force the type to be any other type:
the way to refer to an element, while configuring it is by using the string composed by modifier-name (NOTE: while defining you use modifier=name, the reason of this is lost... should you ask for it I could cosider to change it).
So if you want to add an onClick to an input type you just need to write:
$class->wconf("e-name","onclick=my_javascript")
Only exception is for radiobuttons that need a complete specification:
$class->wconf("r-text/name","onclick=my_javascript")
You may force a string to appear different from the name of the element in two ways:
It is possible to group elements to force more elements into one single cell by using curly braces, another table will be created and put inside the cell of the parent table. curly braces need to be surrounded by spaces
first_name last_name
address { r=male/sex female/sex }
You can also force elements to span in a simple way just using a dash after the element:
name -
te fax
Other features are present but I really don't have any more time to write...