js fabrikElements - dropdown in repeated group

davboh

New Member
Hi, I have a form with one repeated group that contains severals elements and 2 dropdown fabrik elements.
When I add two or more groups on that form and want to manipulate the elements in javascript, I see only one occurence of the 2 dropdowns => table___element_name_0. Others elements are all present in the javascript object
See the attachedDesktop screenshot.png
 
You can access elements data on added group after duplicate event:
JavaScript:
requirejs(['fab/fabrik'], function() {
    Fabrik.addEvent('fabrik.form.group.duplicate.end', function(form, event, groupId, repeatCounter){
        alert('Event - fabrik.form.group.duplicate.end');
    });
});
If you have more than one repeat group you need to validate groupId to run your custom code.
JavaScript:
requirejs(['fab/fabrik'], function() {
    Fabrik.addEvent('fabrik.form.group.duplicate.end', function(form, event, groupId, repeatCounter){
        if(groupId == 'XX'){
            alert('Event - fabrik.form.group.duplicate.end'); 
        }
    });
});
 
Even if a use duplicate event, the js object doesn't contain the 2 elements described in the picture I've attached
 
Who is this template?
Are you tried with protostar template with fabrik default bootstrap form template?
 
I can't replicate this.

Can you point me at a page with this issue, and make sure the global Fabrik "allow debug" option is set to Yes so I can load uncompressed JS.

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

Thank you.

Members online

Back
Top