Skip to content

Commit 94fa5a7

Browse files
committed
removed php hardcoded group name
1 parent 9b4aee2 commit 94fa5a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/resources/views/crud/fields/repeatable.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,14 @@ function bpFieldInitRepeatableElement(element) {
170170
* Adds a new field group to the repeatable input.
171171
*/
172172
function newRepeatableElement(container, field_group, values) {
173+
174+
var field_name = container.data('repeatable-identifier');
173175
var new_field_group = field_group.clone();
174176
175177
//this is the container for this repeatable group that holds it inside the main form.
176-
var container_holder = $('[data-repeatable-holder={{ $field['name'] }}]');
178+
var container_holder = $('[data-repeatable-holder='+field_name+']');
177179
178180
new_field_group.find('.delete-element').click(function(){
179-
//console.log($(this));
180181
new_field_group.find('input, select, textarea').each(function(i, el) {
181182
//we trigger this event so fields can intercept when they are beeing deleted from the page
182183
//implemented because of ckeditor instances that stayed around when deleted from page

0 commit comments

Comments
 (0)