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 Navigation links do not point to result page until ajax search done

Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Quagga
    #270384

    Hi there,

    I have set a search using shortcode for results, and place both form and result shortcode on the same page.
    It is set to display result using ajax, and only use ajax on the result page ; also it is not bookmarkable.
    It use the default template.

    Ajax result works nicely

    The navigation links at the bottom of the results do appear, but do not point to the result page, thus the current page (as there is only one form and result shortcode being on the same page), but elsewhere… but if I have already done an ajax search ?!

    One weird thing is that the navigation links points toward a page which has a from as well (but the are many so why this one)

    Do you have already encunter something similar, or do you have any guidance on how to solve that ?
    For now the only solution I’ve found is to use infinite scroll, which works, but this in absolutely not viable solution as this form create of sort of directory with many many results.

    Thank’s for your support

    Trevor Moderator
    #270387
    This reply has been marked as private.
    Quagga
    #270433

    Hi again.

    I just realize that the issue occurs on a page where there are two forms.

    IN SHORT
    Both form are fully built with shortcodes, all on the same page.
    form A navigation lead to form B result page if no ajax request have been done on form A.

    Beyond that, there is a small hack that shouldn’t affect form A, but I’ll explain it below

    IN DETAIL

    Form A and B are built as such
    Both form and result shorcode result on the same page
    Auto submit form is on
    Ajax result is on
    only use ajax on result page is off
    none have submit buttons

    Form A specificity and behaviour :
    Search is not bookmarkable
    Form result url is the same page as where the form is
    default template
    Behaviour :
    ==> Ajax search works great
    ==> Navigation has the behaviour describe in my post above : works in ajax if a ajax search has already been done, head to an “other” page if page just loaded without search done on this form.

    Form B specifity and behaviour :
    Search is bookmarkable
    Form result url is NOT the same page as where the form is
    custom template
    Behaviour :
    Ajax search works great
    no navigation in the template

    Why such settings ?
    form B is used on several pages, thus the form and result shortcode are necesarly not on the result url (except once)

    Also,form B template has a custom html button.
    There is a js script that
    contains a function that get the url parameter of form B,
    an event listener.
    When my custom html button is clicked, it head to from B result page with form B parameter in url, as such
    https://myDomain.net/formB-result-page/_sf_s=test

    The fact is I can’t see why form A navigation head to from B result page in any circumstances, and it sesms like an issue siply resulting from having two forms on the same page.

    I hope you may help to solve this

    Regards

    Trevor Moderator
    #270484

    Generally, having two forms (whether the same form duplicated, or two different forms), there is the probability that the forms will conflict with each other, and thus you should avoid doing this.

    Where a form is generally included on most/all pages, but another form is used on a specific page, you would need to find a way to exclude the general form on that page. For example, if the general form is in a sidebar as a widget, widget logic plugins exist to allow rules to be added so that you can exclude the display of that widget on certain pages.

    Quagga
    #270523

    Hi

    Thank’s for your reply.

    Well, there always are walkaround like you suggest, but I want to have to forms on the same page. It could be designed differently, but would loose a lot in terms of UX, which is my priority when it comes to provide my site content to the visitors.

    Luckily I have found a workaround : do not provide a result url to form B. As I’m having a custom template with a custom button to head to the result page in form B, I can live with that without loss.
    It works, but feel weak for the reasons you mentioned.

    Having two forms on the same page might be enable tremendous enhancement. Actually, this is THE why I went for SF rather than facetWp. Apparently facetwp can’t by design, SF could, go for it as a supported feature ! Go V3 go ! It is both super powerful and differentiating !

    Cheers

    the use cas I have in mind is basically grounded on the posibility to have two forms on the same page

    Trevor Moderator
    #270528

    It looks like we have taken this as far as we can for now, awaiting V3. Is it OK to close this thread for now?

    Quagga
    #270530

    yes yes,
    And I’m glad I have a solution 🙂
    I’m not sure how many people will need two forms on the same page, but this is my top feature request (and I may have plenty)

    Trevor Moderator
    #270532

    It is a common request, as is the need to split a form up into different parts to place on the page. Iwill close this thread for now.

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

The topic ‘Navigation links do not point to result page until ajax search done’ is closed to new replies.