Forums › Forums › Search & Filter Pro › Navigation links do not point to result page until ajax search done
Tagged: navigation, V3
- This topic has 7 replies, 2 voices, and was last updated 4 years, 10 months ago by
Trevor.
-
Anonymous(Private) December 20, 2020 at 12:44 pm #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 buttonsForm 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 templateWhy 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=testThe 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(Private) December 21, 2020 at 12:20 pm #270484Generally, 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.
Anonymous(Private) December 21, 2020 at 2:10 pm #270523Hi
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
-
AuthorPosts