Page 1 of 1

This is a javascript and HTML problem. Context: This is a select dropdown that has a for loop from the jinja template. <

Posted: Fri May 20, 2022 1:38 pm
by answerhappygod
This is a javascript and HTML problem.
Context: This is a select dropdown that has a for loop from the
jinja template.
<select id="UC" name="unitid"
class="form-control" > required>

<option
value="" hidden>Select some</option>

{% for x in units
%}

<option
value="{{x.unitid}}">{{x.names}}</option>

{% endfor %}

</select>
Problem: Create a javascript function that enables the select
dropdown to be both multi select(select multiple options in the
dropdown) and have a search bar in it. Modify the html code if
necessary. Provide snapshots of the output. Explain what you
did.
Below is an example of what I am looking for with multi select
and a search bar.
Multi-select:
This Is A Javascript And Html Problem Context This Is A Select Dropdown That Has A For Loop From The Jinja Template 1
This Is A Javascript And Html Problem Context This Is A Select Dropdown That Has A For Loop From The Jinja Template 1 (21.35 KiB) Viewed 41 times
Search Bar:
This Is A Javascript And Html Problem Context This Is A Select Dropdown That Has A For Loop From The Jinja Template 2
This Is A Javascript And Html Problem Context This Is A Select Dropdown That Has A For Loop From The Jinja Template 2 (21.75 KiB) Viewed 41 times
Alaskan/Hawaiian Time Zone Alaska Hawaii Pacific Time Zone California x Alaska x Hawaii x California

Alaskan/Hawaiian Time Zone Alaska Hawaii Pacific Time Zone A California