Hi,
In my custom component, I had created a custom field that was based on the repeatable JForm field.
Up until the 3.7 upgrade, it was working really well.
Post upgrade I have noticed that it is duplicating the chzn drop down inputs contained in the repeatable elements.
I have debugged it down to the following function causing the problem:
[code]
self.fixScripts = function($row){
// chosen hack
if($.fn.chosen){
$row.find('select').chosen()
}
//color picker
$row.find('.minicolors').each(function() {
var $el = $(this);
$el.minicolors({
control: $el.attr('data-control') || 'hue',
position: $el.attr('data-position') || 'right',
theme: 'bootstrap'
});
});
// fix media field
$row.find('a[onclick*="jInsertFieldValue"]').each(function(){
var $el = $(this),
inputId = $el.siblings('input[type="text"]').attr('id'),
$select = $el.prev(),
oldHref = $select.attr('href');
// update the clear button
$el.attr('onclick', "jInsertFieldValue('', '" + inputId + "');return false;")
// update select button
$select.attr('href', oldHref.replace(/&fieldid=(.+)&/, '&fieldid=' + inputId + '&'));
});
// another modals
if(window.SqueezeBox){
SqueezeBox.assign($row.find('a.modal').get(), {parse: 'rel'});
}
};
[/code]
Primarily it is this line within the above function:
[code]
// chosen hack
if($.fn.chosen){
$row.find('select').chosen()
}
[/code]
I have looked in the repeatable script file in 3.7 the offending lines are not in the version 3.7 code as it was in the 3.6.5 version.
However, if I remove that line, my selected values are not displayed properly.
Is anyone able to shed any light on how I fix this?
Thanks
Lee