I'm trying to use a Bootstrap (v5.3.3) popover to display a basic search form.
Here's the HTML:
<li class="nav-item"><a id="searchLink" class="nav-link" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-html="true" data-bs-content='<form><input class="form-control" type="text" name="search" /></form>'><i class="fa-solid fa-magnifying-glass"></i></a></li>
And here's the javascript:
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]');
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl));
Is there a reason why the form won't display? The popover is blank. But if I replace it with basic HTML tags and text -- it works properly.
Or should I be using a different method to display a popup search form in Bootstrap? I don't want it to display in a modal.