Home › Forums › Quform WordPress › Select2 element outside Quform form
- This topic has 3 replies, 2 voices, and was last updated 5 years, 6 months ago by
Venom.
- AuthorPosts
- October 7, 2019 at 4:07 pm #30037
Venom
ParticipantHi Ally,
I have a simple page with multiple Select2 fields. This page does not contain any Quform form. Since the Quform plugin has defined the jquery.select2 feature embedded in quform.js, that is fine to use the select2 function which comes with Quform.
I have two Select2 options fields inside the page
<select class="select1-sample" name="state"> <option value="AL">Alabama</option> <option value="WY">Wyoming</option> </select> <select class="select2-sample" name="state"> <option value="AL">Alabama</option> <option value="WY">Wyoming</option> </select> $(".select1-sample").select2(); $(".select2-sample").select2();
However,only the last selection element (select2-sample) would activate the select2 feature, the first selection element will not initalize the Select2 feature, i.e. plain selection box only.
Regards,
Venom
October 8, 2019 at 12:00 pm #30046Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 8, 2019 at 1:51 pm #30050Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 8, 2019 at 2:22 pm #30052Venom
ParticipantHi Ally,
You are correct. The root cause is the same ID for those select elements that make Select2 from work propertly . Thank you for your great support. Please close the case.
regards,
Venom
- AuthorPosts
- You must be logged in to reply to this topic.