This question is regarding Auctionpress theme advanced search. Currently the search fields show blank when page loads, untill clicked on a dropdown or select list to select the value. Would it be possible to display a caption or a default value e.g. “Select a value …” etc as first value of the select list?
Also how to display the fields horizontally side by side to each other ?
Thanks for help
1. You can try to add [Select a value …] at the top of your select values on the search field.
2. you can use css to edit the layout.
Thanks for the reply Alex.
I have a field for ‘Cities’ for example in a select drop down. As this list is being built dynamically, I have no option to add a value manually.
I want this field to display the first entry in the select box when page loads, so the customers don’t have to select the fields, they just press submit to see the results.
Oh for the country,state,city fields its not possible sorry.You may try to edit the file: framework/class/class_search.php to do this.
Thank you Alex this really helped me to set the default value in a select drop down list.
For other users reference who are looking for the same solution, this is what I changed in ramework/class/class_search.php
1) To pre select first value in City field change code at line number 1526:
printf( ‘<select name=”%s” class=”form-control input-sm” id=”core_’.$field->key.’_dropdown’.$extraID.'”><option value=””> </option> ‘, $field_name );
printf( ‘<select name=”%s” class=”form-control input-sm” id=”core_’.$field->key.’_dropdown’.$extraID.'”> ‘, $field_name );
See screenshot for reference.
Hope this helps
Thanks for sharing 🙂
That’s great. Thank you for sharing what you have changed 😉
Start your new website today!