I've got a dropdown with a list of regions, I'd like the drop down to auto select an item based on the variable value I assign.
Here's the code.
<select name="_sft_location[]" class="sf-input-select" title="">
<option class="sf-level-0 sf-item-0" data-sf-count="0" data-sf-depth="0" value="">All Locations</option>
<option class="sf-level-0 sf-item-177" data-sf-count="2" data-sf-depth="0" value="all">Location A</option>
<option class="sf-level-0 sf-item-139" data-sf-count="24" data-sf-depth="0" value="vic">Location B</option>
</select>
So for instance, if I have a PHP variable $defaultLocation = "Location B"
, the dropdown should autoselect "Location B" from the list on page load.
Hope this is clear.