summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindex.cgi20
1 files changed, 14 insertions, 6 deletions
diff --git a/index.cgi b/index.cgi
index 41b8f11..e437f22 100755
--- a/index.cgi
+++ b/index.cgi
@@ -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 $_;
}