Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Autocapitalize, autocorrect and autocomplete for search inputs

Viewing 9 posts - 1 through 9 (of 9 total)
  • Nick Sotiriadis
    #255811

    Hello,
    I want to remove the iOS keyboard suggestions, which essentially can be achieved by adding the following properties on an input tag:

    <input type=”search” autocapitalize=”off” autocomplete=”off” autocorrect=”off”>

    Is there a way to do this in the search fields of SF?

    Ross Moderator
    #255812

    Hi Nick, you can edit the attributes of our inputs by using the following filter:
    https://searchandfilter.com/documentation/action-filter-reference/#filter-input-object

    If you check the github example you can see how to access the attributes.

    Thanks

    PS, we’ve just finished implementing these on our input fields in the upcoming S&F v3 🙂

    Nick Sotiriadis
    #255816

    Thanks for the swift reply Ross! 🙂 Looking forward to the next version! Hopefully some of the other suggestions I did will be implemented as well – like placeholders for range-dropdowns, search fields in checkbox lists, etc! Fingers Crossed!

    Ross Moderator
    #256088

    Hi Nick

    Yeah some of those are already being added to v3 🙂

    Best

    Nick Sotiriadis
    #256118

    Hello,

    I read the example and the gist, but still haven’t been able to find how to use this filter – it would be a great idea if you added a simple example on the website.

    How can you retrieve the input object name of a search field so that you can use this filter?

    Nick Sotiriadis
    #256122

    Found it by investigating the inspector, but I think the name of each field should be more clearly visible.

    Here is my working function:

    function top_search_additional_attributes($input_object, $sfid) {
    		if($input_object['name']=='_sf_search' && $sfid==161) {
    			$input_object['attributes']['autocomplete'] = 'off';
    			$input_object['attributes']['autocapitalize'] = 'off';
    			$input_object['attributes']['autocorrect'] = 'off';
    			$input_object['attributes']['spellcheck'] = 'false';
    			echo $sfid;
    		}
    
    	return $input_object;
    }
    add_filter('sf_input_object_pre', 'top_search_additional_attributes', 10, 2);
    Ross Moderator
    #256428

    Hi Nick

    Thanks for the feedback, totally agree with you there.

    We will make it either, editable, or visible in the admin UI in v3.

    Best

    Nick Sotiriadis
    #256432
    This reply has been marked as private.
    Ross Moderator
    #256467
    This reply has been marked as private.
Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.