Doesn't make much difference to the complexity.
Basically, you'll have to extract some of the code from default_repeatgroup_row.php, everything between ...
PHP:
<?php foreach ($this->elements as $element) :
// everything in this foreach ...
endforeach;
... and insert it into a new file, something like default_repeatgroup_row_element.php. Prepend this to the start of the new file:
PHP:
defined('_JEXEC') or die('Restricted access');
$element = $this->element;
So you now have a separate template file which builds the TD for each element.
Then in default_repeatgroup_row.php, instead of that foreach, you can then render each element individually, by doing ...
Code:
$this->element = $this->elements['element_name'];
echo $this->loadTemplate('repeatgroup_row_element');
So, say you had four elements, named field1 through field4, and you wanted to render them in two rows inside the normal one row, you could do something like ...
PHP:
<?php
/**
* Default Form: Repeat group rendered as a table, <tr> template
*
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005-2016 Media A-Team, Inc. - All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
* @since 3.0
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
$group = $this->group;
?>
<tr class="fabrikSubGroupElements fabrikSubGroup">
<td>
<table>
<tr>
<td>
<?php
$this->element = $this->elements['field1'];
echo $this->loadTemplate('repeatgroup_row_element');
?>
</td>
<td>
<?php
$this->element = $this->elements['field2'];
echo $this->loadTemplate('repeatgroup_row_element');
?>
</td>
</tr>
<tr>
<td>
<?php
$this->element = $this->elements['field3'];
echo $this->loadTemplate('repeatgroup_row_element');
?>
</td>
<td>
<?php
$this->element = $this->elements['field4'];
echo $this->loadTemplate('repeatgroup_row_element');
?>
</td>
</tr>
</table>
</td>
<?php
if ($group->editable) : ?>
<td class="fabrikGroupRepeater">
<div class="pull-right">
<?php
if ($group->canAddRepeat) :
echo $this->addRepeatGroupButtonRow;
endif;
if ($group->canDeleteRepeat) :
echo $this->removeRepeatGroupButtonRow;
endif;
?>
</div>
</td>
<?php endif; ?>
</tr>
... so basically we've replaced the 'foreach' that renders each element, with a specific two row table layout the individually renders four elements.
-- hugh