Forums Forums Search & Filter Pro SFP doesn't load search results page from a bootstrap modal window

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #77681

    hello SFP,

    I have a search form in a bootstrap modal window. When you submit, the search query terms are added to the URL, but you are not redirected to the search results page. As an experiment, I exposed this same search form in the main content area without using the modal. It works perfectly. Any ideas why this is not working for a modal?

    You can try it here:
    http://uvmmc-hl.partisanpixel.com/
    first try the form just under the main navigation. Then try the search by going to the bottom of the page and selecting the box “Browse and Search Highlight’s Archive”.

    I’m on WP 4.7, using SFP 2.2.
    The search form uses a shortcode and displays results with a customized version of results.php in the search-filter/template directory.
    The results URL is http://uvmmc-hl.partisanpixel.com/search, using page-search.php to echo the shortcode for result.

    Any insight or feedback is appreciated.

    thx,
    Michael

    Trevor
    #77739

    I am inspecting the form on the modal and its container is this:

    <form role="search" lpformnum="24">

    Using the search at the top of the page, the resulting url, which looks right, is:

    http://uvmmc-hl.partisanpixel.com/search/?_sf_s=Vermont
    

    But the modal form gives this:

    http://uvmmc-hl.partisanpixel.com/?_sf_search%5B0%5D=vermont&_sf_submit=Search
    

    Which is not right.

    Anonymous
    #77759

    Hi Trevor,
    the modal is not correct. You don’t see any results, it simply appends the URL of the existing page.

    Michael

    Trevor
    #77770

    Yes, but if I inspect the page with the modal open, and look at the HTML for the modal, I do not see our form there?

    Anonymous
    #77776

    I see it in the source code. Here’s the modal section of view source. Doesn’t the SFP form start on line 17?

    http://pastebin.com/v2jRufE4

    Trevor
    #77782

    No, the form starts on line 15. But it isn’t an s&F form. The elements are copies of what would be in an S&F form, but without the wrapper and then being activated as an S&F form, it will not work as one.

    Anonymous
    #77802

    head in hands

    I forgot to strip out the placeholder <form> tags that surround the shortcode. Thanks for the help Trevor.

    Trevor
    #77812

    Is this resolved and can I close the thread?

    Anonymous
    #77823

    Yes, thanks.

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