Forum
Get search to redirect to search.php
Hello,
I have a fairly clean install of Perch 2.8.10
My question is regarding the search function of Perch.
When on any page in the website, If I use the standard search form that I have included in the footer, how do I redirect the user to search.php?s=query
Currently the search form simply appends the query onto the current URL.
Thanks
What does your search form template look like?
Have you set the
action
attribute on the form? That controls where it's posted to.No I haven't set the action attribute, I simply used the default code that ships with perch. Thanks
Okay so try
That did it, thanks Dexter!
Thanks Dexter. This helped me too.
As an addition to the question above: I have a pop up search box on my navigation bar and by using the method you discribe above it is working beautifully for all the pages in the top level. But the pages in a sub folders ( eg blogs) can't found page when I add the following to the header.
where can I include ../search.php as the path without messing up the top level headers? :-/
Kind regards
Julie :-)
Hi Julie,
As long as you use a
root relative
path you will be fine.e.g.
/directory/file
different path types are described here: https://www.motive.co.nz/glossary/linking.php?ref
Of course! :->
Thank you Dexter. :-D
Hi Dexter, another small problem you may be able to solve for me.
My search box has an icon button for submit but over it is the 'Submit Query' text from the original search sample page.
Where do I go to remove this text, so only the icon is visable. This is the code I am use for the search-form.html:
Kind regards
Julie :-)