conditional format in repeatable group

mhelm

Member
I use a repeatable group in a form containing several records:
el1 el2 el3 el4
10 20 0 40
0 0 10 30
11 30 0 30

I want a conditional format, so that all "0-values" are displayed in grey while all "non-0-values" are displayed in black...any ideas?

Thanks in advance
-mhelm
 
Ok - tried that...
I created a custom_css.php and was able to change the labelformat for the desired group (nr.10) - this works:

#{$view}_$c #group10 .fabrikLabel {
font-weight: bold;
}

but how do manage to hide all element labels and only show the first one as heading?
 
I've done this by editing default.php (of the copied labels-above template, don't modify fabrik templates because the modifications will be overridden with the next update)
adding
$label = true;
in line 44 and replacing
Code:
echo $this->loadTemplate('group');
?>
with
Code:
<ul>
<?php 
foreach ( $this->elements as $element) {

    ?>
    <li <?php echo @$element->column;?> class="<?php echo $element->containerClass;?>">
        <?php if ($label) {echo $element->label;}
        else  {echo '<span style="display:none">'.$element->label.'</span>';}?>
        <?php echo $element->errorTag; ?>
        <div class="fabrikElement">
            <?php echo $element->element;?>

        </div>
        <div class="fabrikErrorMessage">
                <?php echo $element->error;?>
            </div>
        <div style="clear:both"></div>
    </li>
    <?php }
    $label=false;?>
</ul>

Display the labels as hidden as they are necessary as "label for ..." the input field.
In this php you can also check the element values and add depending CSS colors.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top