Issue with Repeatable Group in list (TABS layout)

emcguire

Member
Hello Community,

Fabrik 3.0.9
J! 2.5

I have a form that has a repeatable group. group works great on form submission.

for some reason in the list though, the entire group repeats itself twice.

I have attached a screen shot.

there should be just 2 events in this group. it does show both events, but then it shows them again right below it. and it has the repeat add/delete group buttons on that as well...like you can also add another group of 2? strange.

I am using a Left Join to display this group in the list. Ive tried every combination I can think of with the Join options. I have Merge Rown and Reduce Data selected.

I have searched the forum for a possible solution, but I dont see any...

any suggestions would be fantastic.

Thanks
 

Attachments

  • Full Promo.png
    Full Promo.png
    72.8 KB · Views: 571
friendly bump.

I did find someone else that had this same issue, but he said he figured it out but didnt post the fix...

anyone else seeing this problem?
 
I have narrowed it down to the TABS layout. repeated group displays properly in Bluesky layout but when it is in the tabs layout - it is duplicating itself twice. I have gotten the latest tabs code from the github, and replaced the files in the TABS layout folder, the extra add/remove icons are now gone, but the duplication problem still remains. (The form im in I have to use the TABS layout because it is join together with other tables)

It is almost like it is grouping the 2 records together and making that one repeatable group. the attached file will explain what I mean better. the add/remove icon is above the group of 2 records instead of each one individually... like is knows there are 2 records but it is lumping both of them together in one repeatable group...
 

Attachments

  • Full Promo.png
    Full Promo.png
    77 KB · Views: 538
Try use my tabs template see it how. If the problem still there i'm sure your repeat group setting have a problem. If the problem no more, your tabs template got a problem.
 

Attachments

  • tabs_faizi.zip
    16 KB · Views: 433
Ah Yes! Thank You myfatebiz! that did the trick, not sure what is goin on with the fabrik tabs repeat group but yours works great, I replaced your css with the tabs template css and it worked perfectly!

Thanks Again! this one had me stumped for days!
 
Hey myfatebiz, one thing.... how can I get rid of the print icon link at the top? I cannot seem to locate it in the code anywhere... the image is broken and I have the print icon set to HIDE in the settings... and I dont want to be able to print this form... thanks!
 
Oh sorry.. That tabs template using my own style. Replace default.php with this one...

PHP:
<?php
/**
* Tabs Form Template
*
* @package    Joomla
* @subpackage  Fabrik
* @copyright  Copyright (C) 2005 Fabrik. All rights reserved.
* @license    http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @since      3.0
*/
?>
<?php
if ($this->params->get('show_page_title', 1)) : ?>
    <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></div>
<?php
endif;
$form = $this->form;
if ($this->params->get('show-title', 1)) {?>
    <h1 style="text-align: center;">
        <?php echo $form->label;?>
    </h1>
<?php }
echo $form->intro;
echo $form->startTag;
echo $this->plugintop;
$active = ($form->error != '') ? '' : ' fabrikHide';
echo "<div class=\"fabrikMainError fabrikError$active\">$form->error</div>";
 
if ($this->showEmail) :
    echo $this->emailLink;
endif;
if ($this->showPDF) :
    echo $this->pdfLink;
endif;
if ($this->showPrint) :
    echo $this->printLink;
endif;
echo $this->loadTemplate('relateddata');
?>
<br />
<dl class="tabs">
<?php
$display = 0;
$c = 0;
foreach ($this->groups as $group) :
$this->group = $group;
    $errorstyle = '';
    foreach ($group->elements as $element) :
        if ($element->error !== '') :
            if ($display === 0) :
                $display = $c;
            endif;
            $errorstyle = 'style="background:#EFE7B8 url('.COM_FABRIK_LIVESITE.'/media/com_fabrik/images/alert.png) no-repeat scroll left 7px !important;padding-left:40px;"';
            break;
        endif;
    endforeach;
    $c ++;
    ?>
    <dt id="group<?php echo $group->id; ?>_tab"
        <?php echo $errorstyle?>>
        <?php echo $group->title;?>
    </dt>
    <dd class="fabrikGroup" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
    <?php if (trim($group->title) !== '') :
    ?>
        <legend><span><?php echo $group->title;?></span></legend>
    <?php
    endif;
 
    // Show the group intro
    if ($group->intro !== '') :?>
        <div class="groupintro"><?php echo $group->intro ?></div>
    <?php
    endif;
    ?>
    <?php
   
 
    // Load the group template - this can be :
    //  * default_group.php - standard group non-repeating rendered as an unordered list
    //  * default_repeatgroup.php - repeat group rendered as an unordered list
    //  * default_repeatgroup.table.php - repeat group rendered in a table.
 
    $this->elements = $group->elements;
    echo $this->loadTemplate($group->tmpl);
    ?>
    <div style="clear:left;"></div>
    </dd>
<?php
endforeach;
?>
</dl>
<?php
echo $this->hiddenFields;
echo $this->pluginbottom; ?>
<div class="fabrikActions"><?php echo $form->resetButton;?><?php echo $form->submitButton;?>
<?php echo $form->prevButton?><?php echo $form->nextButton?>
<?php echo $form->applyButton;?>
<?php echo $form->copyButton  . " " . $form->gobackButton . ' ' . $form->deleteButton . ' ' . $this->message ?>
</div>
 
<?php
$document = JFactory::getDocument();
 
echo $form->endTag;
echo $form->outro;
echo $this->pluginend;
echo FabrikHelperHTML::keepalive();
$options = "{display:$display}";
$js = '        head.ready(function() { $$('dl.tabs').each(function(tabs) { new JTabs(tabs, '.$options.'); }); });';
FabrikHelperHTML::addScriptDeclaration($js);
$document->addScript(JURI::root(true). '/media/system/js/tabs.js');?>
 
Thank you so much for sharing , I had downloaded the template and with the default script which you had posted i am now able to display my repeat data in the tab view. However i am having some issue that is the fields element are too close to each other. I had attached a picture here, hope you can advise me how to make the adjustment.

Many thanks
 

Attachments

  • Tab_Details.jpg
    Tab_Details.jpg
    51.7 KB · Views: 448
Reference to the attachment in my early post advice me which part of the code inside the template_css.php I can change to align my input field in the 2nd tab to align properly.

Thank you
 
You can change or remove the code at template_css.php

Line 572

PHP:
#{$view}_$c LI.fabrikElementContainer[class*='Repeat'] DIV.displayBox DIV.leftCol {
    width: auto;
}

And

Line 170

PHP:
#{$view}_$c DIV.leftCol {
    padding-top: 4px;
}

Note : You can use inspect element features at browser like mozilla firefox to find which code need to modify in that template.
 
Ok I had tidy up the alignment but then when i add a display element in the form to show a block of text. It does not flow and become like the attached.

Sorry I am very bad in CSS script , can somebody help to point out what i should change in the template_css.php to enable the text to flow properly.

Thank you so much
 

Attachments

  • css_issue.jpg
    css_issue.jpg
    31.2 KB · Views: 416
I think this is a known Fabrik issue with display element. you can try putting your info in the default text and set "show label" to false. not sure why Fabrik doesnt handle this correctly.
 
Please refer to this similar site which i had created as the original is in my intranet.

http://asap.stmarine.net/index.php/register-event

I had also tried emcguire suggestion but does not work.

Thanks hope someone can help

I also notice something strange, the template I have to press F5 to refresh the page to get the template to display correctly else the tab is not next to each other but rather in a vertical arrangement.
 
Insert the code below to your template for the label :

PHP:
label.fabrikLabel[for*='event_reg___info'] {
    width: 400px;
    display: inherit;
}
 
myfatebiz do you mean insert into the template_css.php or custom_css.php or default.php.

Thank you so much for your reply.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top