I have a pop up box on a siteplan image that includes a select dropdown to let people select the apartment that they want. However, I can't get the it to go to the url when it's selected. So need some help please.
Currently when you select Plot 18 from the dropdown options it goes to:
websitename/developments/surrey/knowle-hill-park?sitemap=%2Fplot-18
however it needs to go to:
websitename/developments/surrey/knowle-hill-park/available-homes/plot-18
Can someone help show what i'm doing wrong in the form below:
<form action="{{ category.url }}">
<div class="form-group">
<div class="selectwrap">
<select id="sitemap" class="form-control" name="sitemap" onchange="this.form.submit()">
<option value="">Select Plot No</option>
{% for entry in craft.entries.section('availablehomes').relatedTo(category).level(2).order('plotPrice desc') %}
{% if entry.plotType == 'apartment' %}
<option value="/{{ entry.slug }}">{{ entry.title }} - {{ entry.floor.label }} - {% if entry.plotAvailability == 'available' %}{{ entry.plotPrice|currency('GBP', true) }}{% else %}{{ entry.plotAvailability.label }}{% endif %}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
</form>
'/
infront of your slug.<option value="/{{ entry.slug }}">
try removing that so it will be:<option value="{{ entry.slug }}">
– Justin Dekkers Mar 16 '17 at 16:01