You add the code to the forms being used when you are getting the error. In your case, if it's the search form, make sure it is in the search form. As for the ajax requests, if your search form uses ajax, then yeah, you may have to add it there.
Seriously, the easiest way to find/solve this problem is through reverting templates or comparing them to the default one.
|