79165468

Date: 2024-11-07 08:01:48
Score: 1
Natty:
Report link

Apologies if my question was unclear, Im still new to this field. However, I’ve found a solution based on a comment by "aurelian-scarlat" in the GitHub issue:

https://github.com/Meteor-Community-Packages/meteor-autoform-select2/issues/44

I cannot use the class name ".select2normalWithouClear" because there are some other elements with the same class. So what i did was give the new class name same for all my select and initialized them like this:

<select class="form-control select2normalWithouClear edu-level mySelectDropdown" data-placeholder="Select Education Level"><option>Test 1</option><option>Test 2</option><option>Test 3</option></select>

<select class="form-control select2normalWithouClear edu-instituteName mySelectDropdown" data-placeholder="Select Institution Name"><option>Test 1</option><option>Test 2</option><option>Test 3</option></select>

Initilize it:

$('.mySelectDropdown').select2({ placeholder: $(this).data('placeholder') });

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Unknown