diff options
-rwxr-xr-x | index.cgi | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -109,21 +109,29 @@ if ($form->submitted) { template => $ack_path ); } else { - print $form->render( + printhack( $form->render( header => 1, sticky => (! $form->validate), #FIXME text => $infostring, template => $req_path - ); + )); } } elsif ($ENV{'FORMBUILDER_NOHEADER'}) { - print $form->render( + printhack( $form->render( header => 0, template => $req_path - ); + )); } else { - print $form->render( + printhack( $form->render( header => 1, template => $req_path - ); + )); +} + +# strip div around checkbox field, to support contextually hiding next field +sub printhack { + $_ = shift; + s,<div class="">,,g; + s,</div>\s*(?=<div class="eye color">),,s; + print $_; } |