From b53a6defbc9c63589f8a5cd29cb7f7584bd03c8a Mon Sep 17 00:00:00 2001 From: pollen8 Date: Mon, 16 Sep 2013 11:28:16 +0200 Subject: [PATCH] fixed: repeat group with 2 hidden elements and 1 non-hidden. Applying $groupModel->setColumnCss twice resulted in mal-formed html when the form was rendered --- components/com_fabrik/models/form.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/com_fabrik/models/form.php b/components/com_fabrik/models/form.php index 0e174c17d1c..6edc75f58e0 100644 --- a/components/com_fabrik/models/form.php +++ b/components/com_fabrik/models/form.php @@ -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;