I'm using HTMX and would like to have a <select> form field that automatically loads a specific URL into a <div>.
The "value select" example is similar to this idea, but it includes the value as a query parameter such as /models?make=audi. I would like to use a specific URL for each <option> instead.
This is an approximation of what I would think should work.
<select name="make" hx-target="#models">
<option hx-get="/models/audi">Audi</option>
<option hx-get="/models/toyota">Toyota</option>
<option hx-get="/models/bmw">BMW</option>
</select>
<div id="models">
<!-- hx-get results would go here -->
</div>
However, this does not work and I'm unable to find a way to implement what I describe. How can I achieve the desired behavior?
Edit: Related Twitter thread