This topic is locked

Add Button or hyperlink for Date -/+ one day

11/29/2009 8:26:27 PM
PHPRunner General questions
C
christoph30 author

Hello,
I found some help docs and forum topics about how to implement a new button, like this:
http://www.asprunner.com/forums/topic/7673-list-buttons-for-preset-searches/pagehlbuttonfromsearch1
Unfortunately it doesn't help me really.
I want to do the following on:
On the list page should be 3 buttons or hyperlinks: "Yesterday" "Today" "Tomorrow"

In my table is a field: date. The default on starting the list page should be: "Today". If the user click on "Yesterday", it should be display only entries from yesterday.

But where und how can I implement this? In events or as Php snippet or on visual editor in html mode?
Thanks in advance for some hints for me.
Regards,

Chris

J
Jane 11/30/2009

Chris,
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;



Also you can run search on the list page and then copy search URL to this button.