Hello everyone,
I am running into a little snag with combining extensions "EchMultiSelect" and "jqRelCopy".
What I’m trying to do is copy a set of form elements (login info) one of which elements is an EchMultiSelect widget.
According to tutorial on the jqRelCopy page, I would need to pass a copy of the element (datePicker in their example) to the ‘jsAfterNewId’ option:
'jsAfterNewId' => JQRelcopy::afterNewIdDatePicker($datePickerConfig),
So, I tried to modify that to:
'jsAfterNewId' => JQRelcopy::afterNewIdMultiSelect($multiSelectConfig),
Where I also added the following to JQRelcopy.php:
public static function afterNewIdMultiSelect($config)
{
$options = isset($config['options']) ? $config['options'] : array();
$jsOptions = CJavaScript::encode($options);
return "if(this.hasClass('hasMultiSelect')) { this.removeClass('hasMultiSelect'); this.relCopy(jQuery.extend({$jsOptions}));};";
}
But nothing is being copied.
Can someone help me with this please?
Thanks in advance!