VOI
Member
Hi,
just read the following post in the Professional Support forum:
http://www.fabrikar.com/forums/index.php?threads/form-bootstrap_tabs.38081/
Since I only subscribed to Standard Support I thought I post my solution here:
I implemented a feature to highlight any tabs with validation errors on my site by replacing line 72 of default.php of the bootstrap_tabs template with the following lines:
In the custom_css.php file I then added the following lines:
Maybe someone wants to use this code as well.
Chris
just read the following post in the Professional Support forum:
http://www.fabrikar.com/forums/index.php?threads/form-bootstrap_tabs.38081/
Since I only subscribed to Standard Support I thought I post my solution here:
I implemented a feature to highlight any tabs with validation errors on my site by replacing line 72 of default.php of the bootstrap_tabs template with the following lines:
Code:
<li <?php
$is_err = false;
foreach ($group->elements as $element) {
if ($element->error != '') {
$is_err = true;
break;
}
}
if ($i == 0) {
if ($is_err) {
echo 'class="active fabrikErrorGroup"';
} else {
echo 'class="active"';
}
} elseif ($is_err) {
echo 'class="fabrikErrorGroup"';
}
echo ' style="'.$group->css.'"';
?>>
In the custom_css.php file I then added the following lines:
Code:
/* color & highlight group with validation errors */
.fabrikErrorGroup a {
background-color: rgb(242, 222, 222) !important;
color: #b94a48;
}
.active.fabrikErrorGroup a,
.active.fabrikErrorGroup a:hover,
.active.fabrikErrorGroup a:focus {
border: 1px solid #b94a48 !important;
border-bottom-color: transparent !important;
color: #b94a48 !important;
background-color: rgb(255, 255, 255) !important;
}
.fabrikErrorGroup a:hover,
.fabrikErrorGroup a:focus {
background-color: rgb(222, 173, 173) !important;
color: #b94a48;
}
Maybe someone wants to use this code as well.
Chris