2 field search, 1 button :)

Home Forums Product Support Forums Ajax Search Pro for WordPress Support 2 field search, 1 button :)

This topic contains 2 replies, has 2 voices, and was last updated by zviz zviz 4 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21482
    zviz
    zviz
    Participant

    Hi there
    I’m using the plugin for the first time and i love it ?
    I’ve been asked to build a search that i’m having a bit trouble with, and hoped your tool would be up to the task.

    the thing is that we need it to have two adjacent search fields (one for a CPT and the other for a page category) and both fields should be using 1 search button.
    you can see the fields in the homepage, right after the video.
    I’ve attached an image that shows how it should look like

    I’ve tried to search the documentation thoroughly and played with the settings quite a lot, but didn’t figure out a way to do so.

    hope you can help
    thanks
    Zvi

    Attachments:
    You must be logged in to view attached files.
    #21489
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I’m afraid this is not possible, as two separate search fields cannot be connected or triggered with a single button. You can for example enable the search button on one of the fields, and disable on the other one.

    One possibility could be, to add a custom button via a page builder (maybe visual composer or something else), and the add a custom JS function to that button. The plugin has a javascript API, so it can be used to trigger both searches. If this code is exectued on button click, it would automatically trigger both searches:

    ASP.api(7, 'searchFor');
    ASP.api(8, 'searchFor');
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21494
    zviz
    zviz
    Participant

    Thanks, i’ll look into that solution.

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

You must be logged in to reply to this topic.