cchiacchierini
Member
I am using the code from the wiki to create a horizontal filter: http://fabrikar.com/wiki/index.php/Tmpl_list_default_filter_horizontal. Is there a way to put the field labels to the left of each filter field?
For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
<div class="fabrikFilterContainer">
<table class="filtertable fabrikList">
<?php
$c = 0;
foreach ($this->filters as $filter) {
$required = $filter->required == 1 ? ' notempty' : '';?>
<?php echo ($c % 2). $required;?>
<?php echo $filter->label;?>
<?php echo $filter->element;?>
<?php $c ++;
} ?>
<input type="button" class="clearFilters" value="<?php echo JText::_('Clear Filter');?>"
name="filter" />
<?php if ($this->filter_action != 'onchange') {?>
<?php echo $c % 2;?>
<input type="button" class="fabrik_filter_submit button" value="<?php echo JText::_('COM_FABRIK_GO');?>"
name="filter" />
<?php }?>
</table>
</div>
This will be ok as long as you don't need the "list header" labels as list headings.List settings>header label
This part is originally used to compose a CSS class name including a number, so you are displaying now just the number.$required = $filter->required == 1 ? ' notempty' : '';?> <?php echo ($c % 2). $required;?>
<div class="fabrikFilterContainer">
<table class="filtertable fabrikList">
Find the places near you...
<?php echo "   " ?>
<?php echo "   " ?>
<?php
$c = 0;
foreach ($this->filters as $filter) {
$required = $filter->required == 1 ? 'notempty' : '';?>
<?php echo $filter->label;?>
<?php echo $filter->element;?>
<?php $c ++;
} ?>
<?php echo "   " ?>
<?php echo "   " ?>
<input type="button" class="clearFilters" value="<?php echo JText::_('Clear Filter');?>"
name="filter" />
<?php if ($this->filter_action != 'onchange') {?>
<?php echo $c % 2;?>
<input type="button" class="fabrik_filter_submit button" value="<?php echo JText::_('COM_FABRIK_GO');?>"
name="filter" />
<?php }?>
</table>
</div>