|
|
Reloading Select2 Javascript After AJAX Submission / Validation
Started by: Dave
in: Toolset Professional Support
Quick solution available
Problem:
Select2 jQuery library is not initiated after an Ajax load of the Toolset form.
Solution:
According to the customer:
Add the Select2 jQuery library code inside the "cred_form_ready" event using jQuery ON function. For example:
jQuery(document).on( 'cred_form_ready', function($) {
jQuery('#cred_form_1283_1_1_select-children').select2({
dropdownParent: '#addChildModal',
multiple: 'true',
placeholder: 'Select Child(ren)'
});
});
|
|
2 |
4 |
3 years, 4 months ago
Dave
|