XF 1.5 Search Titles only does not work

Setting it checked by default would be just be a case of modifying the "search" template, and adding 'checked="checked"' to the checkbox HTML.

Does searching by titles work as expected for you on this forum? Are you using Enhanced Search or just the default XF search? Do you have any add-ons installed related to searching?
 
Thanks Chris D.
Search by titles work fine on this forum (xenforo.com). I use the default XF search. I do not install any add-ons related to searching, but I do not know if I have done any mistake to the search function. How can I reset the search function without re-install the forum?
 
It's not really possible to cause a mistake with the search function, that said, it may well be worth rebuilding the search index.

You can do that from Admin CP > Tools > Rebuild Caches > Rebuild Search Index.

Ensure that (All) content types are selected and check "Delete the index before rebuilding".
 
It's the same after rebuilding the search index with your guide.
I hereby attached the results when search "Cefuroxime" with check "Search Title only"
 

Attachments

  • upload_2015-11-11_23-18-35.webp
    upload_2015-11-11_23-18-35.webp
    70.6 KB · Views: 4
Ah I see the problem now.

There appears to be a mistake in your style. Have you edited the search_bar template?

This line is what it should be in the normal default style:
Code:
<li><label><input type="checkbox" name="title_only" value="1"
Based on what I can see on your site, this line is actually:
Code:
<li><label><input type="checkbox" name="title_only" value="0"

Notice the value of 0 will effectively always mean the value of the checkbox will always be 0 regardless of whether it is checked or unchecked.
 
Back
Top Bottom