Tell us what you are trying to do? On the search form on this page: hidden link - we have a select field. Now we like to build it out and like, that customers can start search in addition to only select.
Is there any documentation that you are following? I not found anything
Is there a similar example that we can see? What I did once, but not sure if I can use the similar code:
add_filter( 'wpt_field_options', 'fill_select', 10, 3);
function fill_select( $options, $title, $type ) {
if ($title == 'my-custom-select') {
$options = array();
$args = array('hide_empty' => 'false');
$terms = get_posts( array('cycling-tour'), $args );
foreach ($terms as $term) {
$options[] = array(
'#value' => $term->post_id,
'#title' => $term->post_name
);
}
}
}
In the search form itself, I might have then a normal textfield.
What is the link to your site?
Hi,
Thank you for contacting us and I'd be happy to assist.
I've performed some tests and can confirm that there is no built-in option available in the view's search to convert a regular select field into an 'autocomplete' or 'search as you type' kind of field.
To achieve something like this you'll need to include some custom script through a third-party library like 'select2':
hidden link
For more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
regards,
Waqar