Skip to main content
Jeff_Coatsworth
Community Expert
Community Expert
April 13, 2015
Answered

Changing the default selected setting on the "Highlight search results" field in Search

  • April 13, 2015
  • 1 reply
  • 2253 views

Anyone know any "under the hood" changes that can be made to make the "Highlight search results" field in the Search be set to unchecked rather than checked? I can see in the SSL recipe where to enable it to appear or not appear (and change the colour of the highlighting), but nothing about making it be set to unchecked in the resulting WebHelp output (or any of the other forms of help output where it can appear).

This topic has been closed for replies.
Correct answer Jeff_Coatsworth

Got it! - Yes, it's in that whform.js file - it's this section (line 228 - hope it comes through ok):

if (gbHighlightSearch == true) {

        sForm += "</tr><tr class=\"hilite\" valign=\"middle\"><td width=\"100%\"><input type=\"checkbox\" name=\"HiLite\" checked>" + gsHiliteSearchTitle + "<br></td>";

    }

If you remove the 'checked' bit on that line it sets the state of the box to "unchecked" in the Search pane.

1 reply

Community Expert
April 14, 2015

This thread indicates it's not possible, although it is a fairly old post.

Change default setting for search highlight?

If there hasn't been a change since, I think you have to change the whform.js file in the template_stock directory, or make the change in the output every time you generate. Or possibly you could write a javascript or jquery that would change the setting in the output - that's beyond me, but certainly sounds possible in my head.

For responsive and multiscreen, you can change the setting within Robohelp. Open the search results topic, right-click on the checkbox and select Screen Layout Properties. Then in the properties pane that opens, set Checked to False. (You can also make this change in the code of the search topic.)

Jeff_Coatsworth
Community Expert
Community Expert
April 14, 2015

Thanks – I had missed that thread when I searched (mainly because the search on this forum software is terrible). I’ll poke around in the whform.js to see if there’s anything obvious in there. I wasn’t aware that you could get at it in the HTML5 flavours – haven’t done much poking around in them yet ;>)

Jeff_Coatsworth
Community Expert
Jeff_CoatsworthCommunity ExpertAuthorCorrect answer
Community Expert
April 14, 2015

Got it! - Yes, it's in that whform.js file - it's this section (line 228 - hope it comes through ok):

if (gbHighlightSearch == true) {

        sForm += "</tr><tr class=\"hilite\" valign=\"middle\"><td width=\"100%\"><input type=\"checkbox\" name=\"HiLite\" checked>" + gsHiliteSearchTitle + "<br></td>";

    }

If you remove the 'checked' bit on that line it sets the state of the box to "unchecked" in the Search pane.