Forums › Forums › Search & Filter Pro › 2 search forms on single page
Tagged: V3
- This topic has 5 replies, 3 voices, and was last updated 4 years, 10 months ago by Anonymous.
-
Anonymous(Private) January 8, 2020 at 4:32 am #230383
Hi,
Due to design requirements I have to place the search form at two locations on a single page. one is for desktop view and other is used on mobile/tablet/small desktop (less than 1200px breakpoint). Its mostly working except for some minor issues related to reset and clearing of search form. I hope you would have some suggestions around it.
Issue 1: I am not able to reset forms using the reset button. It clears only one of the form (mobile view) and the desktop form continues to show last active checkboxes as selected even though at backend the values of the checkboxes are reset/cleared.
Issue 2: I have 2 search inputs that I am hiding (thru CSS) and using js to post the search form using the values from input fields placed out of the form. I am not able to figure out the correct way to use “sf:ajaxfinish” event to clear these inputs which are not placed within the form. Inside this event handler, I would like to know when the reset button was clicked.
Thanks,
GaganTrevor(Private) January 8, 2020 at 8:07 am #230386Hi
In general, whilst there are some (and not many) circumstances where having two forms on the same page can work, having the same form (by this I mean searching the same content) twice on a page is likely to cause the issues you describe. Ajax will be one such problem. Until we release V3 of the Pro plugin (in a couple of months we hope) you need to avoid duplicating a form on the page.
Ross Moderator(Private) January 8, 2020 at 4:56 pm #230424Hi Chuck
The only work around I could think of is having 2 search forms, and 2 results areas, and hiding one set with CSS depending on size.
In terms of interacting with 1 result set, then as Trevor mentioned this is not possible with the current version.
Thanks
-
AuthorPosts