This topic is locked

List Buttons For Preset Searches

2/24/2008 7:50:55 PM
PHPRunner General questions
M
MikeB941 author

PHPRunner Build 320
I'd like to add one or two buttons to the list page that will execute preset searches (such as all active or all inactive records) and I'd also like one of these preset searches to by the default when the list page is first executed.
Any sample code available on this?
Many thanks!
Take Care... Mike.

J
Jane 2/26/2008

Mike,
to add button use custom event (Insert PHP code snippet option) on the Visual Editor tab.

Here is a sample:

$str = "<input type=\"button\" class=\"button\" value=\"search\" onclick=\"window.location='tablename_list.php?a=search&value=1&SearchFor=YOUR-VALUE&SearchOption=Contains&SearchField=FIELDNAME'\" >";

echo $str;