Skip to content

Commit

Permalink
fixed: repeat group with 2 hidden elements and 1 non-hidden. Applying…
Browse files Browse the repository at this point in the history
… $groupModel->setColumnCss twice resulted in mal-formed html when the form was rendered
  • Loading branch information
pollen8 committed Sep 16, 2013
1 parent fad3a4c commit b53a6de
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/com_fabrik/models/form.php
Expand Up @@ -4374,9 +4374,14 @@ public function getGroupView($tmpl = '')

// Style attribute for group columns (need to occur after randomisation of the elements otherwise clear's are not ordered correctly)
$rowix = -1;
foreach ($aElements as $elKey => $element)

// Don't double setColumnCss otherwise wierdness ensues
if (!$groupModel->canRepeat())
{
$rowix = $groupModel->setColumnCss($element, $rowix);
foreach ($aElements as $elKey => $element)
{
$rowix = $groupModel->setColumnCss($element, $rowix);
}
}
$group->elements = $aElements;
$group->subgroups = $aSubGroups;
Expand Down

0 comments on commit b53a6de

Please sign in to comment.