This topic is locked

How to remove the search tip

12/3/2012 6:25:37 PM
PHPRunner General questions
G
gudon author

Hi,
I am using the basic search panel on my list page. I need to get rid of the default tip value "search" in the box. I have tried

a List page after record processed event, but it did not work.
My code:

$recId=$pageObject->recId;

$record["searchfor_attrs"] = "value=\"\" class=\"ctlSearchTip\" name=\"ctlSearchFor".$recId."\" id=\"ctlSearchFor".$recId."\" tip=\"\" ";


I could remove it by changing this line in the searchpanelsiimple.php

$valSrchFor = "search";

to

$valSrchFor = "";
But I prefer to modify it in the event.
Any ideas? Thanks.

C
cgphp 12/3/2012

Try to enter the following code in the "Javascript onload" event:

$("input[id^='ctlSearchFor']").attr("tip","");
G
gudon author 12/3/2012

Hi, Christian,
Thanks for the code. In order to remove the tip completely, I have to empty the "value" attribute as well.

$("input[id^='ctlSearchFor']").attr("value", "");

$("input[id^='ctlSearchFor']").attr("tip", "");
G
gudon author 12/4/2012

Hi,
If I want to do it with a server side code, is it possible to get it done in Before display or After record processed event?
Thank you very much.