=head1 NAME
Package WebGUI::Macro::MLform
=head1 DESCRIPTION
Macro to generate a formElement (default: Date)
=head2 process ( fieldname, fieldvalue [, key , value,... ] )
examples (see Form.pm):
$param{fieldType}
$param{size}
$param{height}
$param{width}
$param{extras}
$param{vertical}
$param{options}
and
$param{showdate}
$param{dateformat}
=head2 install
1. save this macro to <your_webgui_custum_dir>/lib/WebGUI/Macro
2. add
"MLform" => "MLform",
to the macro-definition within your WebGUI.conf
3. restart your server
=head2 examples
This macro was developed for using and editing a userDefined-field as a Date-formfield.
It also may be used for generating other formelements.
Example use a userDefined filed as Date formelement within a template:
^MLdate(userDefined1,<tpml_var userDefined1>);
Show a variable as text:
^MLdate(userDefined1,<tpml_var userDefined1>,readonly);
Show a date-variable value:
^MLdate(userDefined1,<tpml_var userDefined1>,showdate,1,dateformat,%z );
=head2 Gotcha's
The macro works only for the author's purposes and as long as it gets
the input only he knows, it expects.
Use it as long as the result is doing what you want to do.
This macro only helps to input a string as a (ISO-) date format (YYYY-MM-DD) in a text field
and format an (date) output as you like.
Warning (thanks perlDreamer):
The Date form plugin does processing on incoming data, and on data as its retrieved from the form parameter. If you don't do the form processing on the back end (like time zone conversions), it has the potential to really mess up your data. The userDefined fields in the collaboration system won't do that, since they think they are text fields.
=cut