function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Charline MitchenerCharline Mitchener 

Search Bar not working

I have created a custom search bad for the community however when I try and search for something I am receiving an erorr 'this URL no longer exists'

Any ideas what the issue could be? Below is the code

 <form action="/<community>/Search/SmartSearch" method="get">
                <input type="text" class="tftextinput" name="q" size="100" maxlength="120"></input><input type="submit" value="Search" class="tfbutton"></input>
       </form>
Best Answer chosen by Charline Mitchener
sharathchandra thukkanisharathchandra thukkani
Below code should work.

<apex:page >
<form action="/_ui/search/ui/UnifiedSearchResults" method="get">
<input type="text" class="tftextinput" name="str" size="100" maxlength="120"></input><input type="submit" value="Search" class="tfbutton"></input>
</form>
</apex:page>

All Answers

sharathchandra thukkanisharathchandra thukkani
Below code should work.

<apex:page >
<form action="/_ui/search/ui/UnifiedSearchResults" method="get">
<input type="text" class="tftextinput" name="str" size="100" maxlength="120"></input><input type="submit" value="Search" class="tfbutton"></input>
</form>
</apex:page>
This was selected as the best answer
Charline MitchenerCharline Mitchener
Thanks for your help, this works!