repeat group template

coullet

Member
Hi,

i need to move the add/remove button of repeat group as table at the row beginning.

I've edited this files in my bootstrap template
default_repeatGroup_table
default_repeatgroup_row

It's ok, except when there is no row: the add button don't display
I don't find what i need modify...


Thanks
 
In the case where there is no row (either if you have 0 as minimum repeat, or when you delete the last row), we add the "+" button into the header row automatically, in the form JavaScript. However, this relied on two things ... first, the default_repeatgroup_table.php has to add an empty th into the header row, and it had to be the last column.

I've modified this, so that rather than assuming it's the last column, we'll look for a th with a data-role="fabrik-group-repeaters" attribute.

See this commit:

https://github.com/Fabrik/fabrik/commit/a08d6bc68a1954267703fe0ebf2f7441829a66ad

... and you can see around line 34 in that template we add the blank th with that data-role ...

Code:
    if ($group->editable) : ?>
    <th data-role="fabrik-group-repeaters"></th>
    <?php
    endif;

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top