Skip to main content
Jeff_Coatsworth
Community Expert
Community Expert
Apr 13, 2015 3:48 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
Jeff_Coatsworth
Jeff_CoatsworthCorrect answer
Community Expert
Apr 14, 2015 12:37 PM UTC

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.

18 replies

Community Expert
Apr 14, 2015 1:18 AM UTC

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.)

Translate
Jeff_Coatsworth
Community Expert
Community Expert
Apr 14, 2015 12:04 PM UTC

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 ;>)

Translate
Jeff_Coatsworth
Community Expert
Jeff_CoatsworthCommunity ExpertAuthorCorrect answer
Community Expert
Apr 14, 2015 12:37 PM UTC

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.

Translate