You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I would like to thank you for sheepIt. This is a very useful plugin!
Then I would like to submit you a proposal to improve the way it can be used.
I tried to implement jQuery select2 in a sheepIt form using the callback function afterAdd.
// Initialize sheepit fieldsets
$('.sheepit').sheepIt({
separator:'',
afterAdd: function(source, clone) {
clone.extendSelect2s(); // extend select2 apply select2 to all clone children
}
});
Select2 plugin add a additional input with no id, no name and no template attributes but only behaviors that correctly link it to the select2 plugin. However sheepit fails executing if it finds these additional inputs with no templating attributes.
I propose to make formFields selector an option in stead of a simple var in the plugin so we can do this :
Hi Mariano,
First I would like to thank you for sheepIt. This is a very useful plugin!
Then I would like to submit you a proposal to improve the way it can be used.
I tried to implement jQuery select2 in a sheepIt form using the callback function afterAdd.
// Initialize sheepit fieldsets
$('.sheepit').sheepIt({
separator:'',
afterAdd: function(source, clone) {
clone.extendSelect2s(); // extend select2 apply select2 to all clone children
}
});
Select2 plugin add a additional input with no id, no name and no template attributes but only behaviors that correctly link it to the select2 plugin. However sheepit fails executing if it finds these additional inputs with no templating attributes.
I propose to make formFields selector an option in stead of a simple var in the plugin so we can do this :
// Initialize sheepit fieldsets
$('.sheepit').sheepIt({
formFields: "input:not(.select2-input), checkbox, select, textarea",
separator:'',
afterAdd: function(source, clone) {
clone.extendSelect2s();
}
});
What do you thing about this?
Cheers,
Christophe Di Prima
The text was updated successfully, but these errors were encountered: