=
# take care of formfields that have null widths
$formfield->{'input-width'} ||= '250';
$formfield->{'label-width'} ||= '150';
# take care of formfields that have null styles
if (!$formfield->{'label-tdstyle'}) {
if ($formfield->{'iterator'} % 2) {
$formfield->{'label-tdstyle'} = 'greybak';
}
else {
$formfield->{'label-tdstyle'} = 'whitebak';
}
}
if (!$formfield->{'input-tdstyle'}) {
if ($formfield->{'iterator'} % 2) {
$formfield->{'input-tdstyle'} = 'greybak';
}
else {
$formfield->{'input-tdstyle'} = 'whitebak';
}
}
# now that this is done, make sure that special
# formfields are parsed in their own files so
# that colspans and all that don't get messed up
# in the table holding our form...
if ( $formfield->{'type'} eq 'title' ) {
$formfield->{'title table cell'} = qq[
].
q[ ];
return
(
$formfield->{'title table cell'}.
$parser->parse( $live_cmpts->{'title'} ).
' |
'
);
}
elsif ( $formfield->{'type'} eq 'subtitle' ) {
# !! we override subtitle td styles for now !!
$formfield->{'tdstyle'} = 'lightgreybak';
$formfield->{'subtitle table cell'} = qq[
];
return
(
$formfield->{'subtitle table cell'}.
$parser->parse( $live_cmpts->{'subtitle'} ).' | '
);
}
elsif ( $formfield->{'type'} eq 'submit' ) {
$formfield->{'submit table cell'} = qq[
]
.q[ ];
return
(
$formfield->{'submit table cell'}.
$parser->parse( $live_cmpts->{'sumbit'} ).
q[ |
]
);
}
# once we have sent any special formfield types
# to their respective files, treat the current
# formfield normally...
$formfield->{'left table cell'} = qq[
];
if (length($formfield->{'desc'}) > 0) {
$formfield->{'leftside'} =
qq[
$formfield->{'label'}
$formfield->{'desc'}
]
}
else {
$formfield->{'leftside'} = $formfield->{'label'};
}
if ($formfield->{'type'} eq 'readonly') {
$formfield->{'leftside'} = ''.
$formfield->{'leftside'}.
'';
}
$formfield->{'left table cell'} .= $formfield->{'leftside'}.' | ';
$formfield->{'right table cell'} = qq[
];
$formfield->{'rightside'} =
$parser->parse( $live_cmpts->{ $formfield->{'type'} } );
$formfield->{'right table cell'} .= $formfield->{'rightside'}.qq[\n
| ];
return
(
$formfield->{'left table cell'} .$formfield->{'right table cell'}
);
?>