Support Forums

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

Forums Forums Search & Filter Pro Autosuggest

Viewing 7 posts - 1 through 7 (of 7 total)
  • Mekom AS
    #5036

    Hello! Your plugin rocks 😉
    You know what would rock even more? Autosuggest.
    It’d be really nice if the user could type in a textfield, then e.g. post meta would be filled out as he/she typed. This is so much more user friendly than getting a dropdown that consists of 1000+ items.

    If it’s already possible, please let me know! If not, then please consider making it a feature in a future release. We’re using your plugin for a really big website here in Norway and that kind of functionality would be a lifesaver.

    Ross Moderator
    #5070

    Hey Mekom, did you try checking the “combo box” option for a dropdown or multiselect? I think this *might* be what you want? 😉

    Mekom AS
    #5083

    Thanks for your quick reply, Ross 🙂

    I wasn’t aware of the “combo box” so that’s awesome, but now I’ve a different problem unfortunately. I’m using a “relationship” custom field from the Advanced Custom Fields plugin, and when I hit the “auto suggest” button, it shows me the IDs naturally. The problem is that I need their titles instead. Do you’ve any ideas?

    Ross Moderator
    #5135

    Hey Mekom

    I don’t have much experience with the relationship fields and have not setup the plugin to support them – so I’m thinking this will not be easy – essentially you would have to modify the query itself which displays the “auto suggest” options, and I guess does some sort of clever joining to another value in the database – but this is not a simple task I think.

    On a personal level, I would need to do a lot more research in to relationship fields and how exactly they work before I could offer any support for it, but if you want to have a look yourself in:

    wp-content/plugins/search-filter-pro/admin/class-search-filter-admin.php

    Then find the function get_meta_values() on line 528..

    This takes the meta key ($_POST[‘meta_key’]) and looks up all the possible unique values for that key – you would need to modify the query starting on line 537 $wpdb->query("...

    Hope that helps!

    Mekom AS
    #5820

    Hi again, Ross!

    Sry for the incredibly delayed answer. I think it’ll be easier for me to just create an autofill myself which targets a regular textfield from your plugin. Then get all my posts from a query.

    Thanks for your detailed answer though, and it’d be cool if you made it work sometime in the future 🙂

    Ross Moderator
    #5932

    No problem I’ll try!!

    Mekom AS
    #6078

    Hi again, Ross! I ended up making my own CPT autocomplete targeting a “search” field, but then it overwrites the real “search” field in the URL query. Why not just add a “post types” field that autocompletes an arbitrary CPT? This shouldn’t be too difficult to implement and will be an extremely useful feature! Then you won’t need to worry about the relationship stuff either.

    The project I’m working on right now must be finished on the 24th, so I must probably make up my own code for this anyway, but if you’re planning on releasing an update before this or shortly after, please let me know ASAP 🙂

    Thanks,
    Chris

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.