Streaming live at 10am (PST)

Integrating search into select element/dropdown


#1

Hi everyone!

I was hoping to find out if anyone has had any luck with including a search bar into a dropdown menu?

I found this option online https://harvesthq.github.io/chosen/index.proto.html but am unable to figure out how best to integrate it with a webflow form. Is this possible at all?

Thanks!


#2

I prefer Select2.


#3

Thanks! I must say that I'm very new to this... Can you please point me in the direction of some instructions to use this with Webflow?


#4

Well with Select2 it's just following their setup steps and putting it into the Site Settings > Custom Code > Footer Code.


#5

Thank you for your responses Sam. I did my best to follow the instructions (leading to the CDN via header) but then I don't know where to put the 'select' tags in order to make them effect the select element... is this in the footer, then I make sure to set the class as 'select'?

<script type="text/javascript">
$('select').select2();
</script>


#6

I did say everything in "Site Settings > Custom Code > Footer Code".

Select is also known as a "dropdown" component in Webflow, so just add a dropdown in a form.

If you need further help, please read this https://forum.webflow.com/t/posting-guidelines-for-the-code-help-category/6048?u=samliew