Forums Forums Search & Filter Pro Using ACF select field for dropdown (label/value issue)

Viewing 10 posts - 11 through 20 (of 73 total)
  • Anonymous
    #54389

    Thanks for your honesty!
    It would be great if this could work just out of the box.

    I think ACF is amazing and if you support such things, it will definitely be a big plus!
    Otherwise I could build my own little things and work with GET variables to set up a simple database search but I love to have the option for later to do more complex searches once our database has more users. I trust your plugin can be a big helper in the future.

    For now I will fix it by applying a jQuery function that replaces underscores with a space and turns every lower case letter at the beginning of a word into a capital letter.

    Anonymous
    #54390

    Short question.
    Is there somewhere an “edit” button that I can’t see? I would like to correct some types sometimes but did not see an “edit” button near my posts.

    Trevor
    #54398

    I do not know if you can edit (permissions).

    The link to edit a post looks like this:

    https://support.searchandfilter.com/forums/reply/54389/edit/

    Anonymous
    #54399

    Good to know. I was able to fix some bad typos 😀

    Anonymous
    #55112

    Hi Trevor,

    just wanted to share my solution here – the temporary fix, until you support the display of label values instead of values from an ACF dropdown fields.

    
    jQuery(document).ready(function(jQuery) {
    
    	// text replace in the option tags of the select field
    	jQuery("#search-filter-form-702 select").find("option").each(function () {
    
    		// replace each underscore with a space and turn each first letter of the new words into an uppercase letter
    		jQuery(this).text(jQuery(this).text().replace(/_/g," ").split(" ").map(function(i){
    			return i[0].toUpperCase() + i.substring(1)
    		}).join(" "));
    	
    	});			
    	
    });
    

    I had fun making this, so it was not to bad having to do it. 🙂
    I hope this may turn out useful for somebody or even obsolete soon.

    Anonymous
    #56483

    Has this issue been resolved? I am experiencing a similar issue.

    Trevor
    #56519

    We are working on it right now.

    Anonymous
    #56664

    please keep us posted.

    Anonymous
    #56665

    Hi Omar,

    I have figured out a work around based on jQuery. This is not the ideal scenario to have to use this but it works pretty well for me.

    jQuery(document).ready(function(jQuery) {
    
    	// text replace in the option tags of the select field (but not the first one ( slice(1) )
    	jQuery("#search-filter-form-702 select").find("option").slice(1).each(function () {
    
    		// replace each underscore with a space and turn each first letter of the new words into an uppercase letter
    		jQuery(this).text(jQuery(this).text().replace(/_/g," ").split(" ").map(function(i){
    			return i[0].toUpperCase() + i.substring(1)
    		}).join(" "));
    	
    	});			
    	
    });

    Warm regards,
    Sebastian

    Anonymous
    #56719

    Hi Sebastian,
    Thank you. I saw your previous post and i tried you fix but it did not work for me. HonestlyI would rather wait for an official fix especially since this is the functionality I paid for. Thanks for the assistance anyway. I will wait to see if Trevor and his team and create a fix and update ether plugin accodingly.

Viewing 10 posts - 11 through 20 (of 73 total)