This topic is locked
[SOLVED]

  Custom dropdown or radio button to filter list

6/22/2010 7:09:26 PM
PHPRunner General questions
E
electromotive author

Can anyone help me with adding a custom dropdown or radio-button set to a list form to control the 'WhereClause' in a list form?
Many of my tables have a date column. Having first displayed the list in its entirety, I want to be able to use a control on the page to choose/apply one of several standard date filters, such as all, today, last 3 days, last 30 days (without going into the advanced search page and manually entering a from date).
The control ideally could be a dropdown which defaults to 'all', or a radio-button set, so the user can always see which date filter is currently applied. Reselecting the control would trigger a clearing of the previous filter, apply the new filter, and re-display the list from the first page. The from date filter would be calculated Now() - 3days, etc.
Doing this while using the standard events would be preferred, as I want to avoid custom modification of the html or anything that doesn't survive page resets. If it turns out we can only add buttons (while using standard events) then the filter in use would need to be displayed. But how do I reset/clear the current filter (show all) within an event?
I have read several posts and manual regarding custom date filters but of none that seem to hit the mark yet.

D
Dale 6/22/2010

This certainly can be done. I do it all the time, but I am using 5.1

I am sure Ann and the team can point you in the right direction in the latest version.

My technique also means editing the source templates, which avoids reset problems, but it does affect smooth upgrading to the latest version.
You can see how I use it by looking at my latest project on my development server.

This is my live development project, so I stress that everybody is welcome to check it out and give me any feedback, but please just dont delete things,

or upload some not so wanted pictures. I think its a great app, all done with PHPRunner and the great support you get from this forum.
Navigate to my development site, www.vintbrew.com , select the top right button Construction Deficiencies Management Solution.

Login as username site password admin

Your logging in as a minimum access level user, but you can get a look at a sample of my work. (very limited access, the bulk of the work is available to higher access levels.)
Please feel free to click around, I just ask you respect the context of the application (no silly data entry) and please dont delete anything.

When you have logged in, you will be presented with a list page of deficiencies for a construction project.

Note the Active Done All radio button set, above the list and below the master table information.

Selecting a different radio button, will run the search criteria and display a refreshed list.
The quick search retains the radio button choice, and when using the Advanced search, because this applies to the whole dataset, the radio button is automatically reset to ALL.
I have done the date thing, with another application for the invoicing, show the invoices today, yesterday, last week, this month, etc etc. all with tabs on the list view.
PS to all the forum,

I am actually finished with my last project, so I would be more than willing to freelance any work that may be out there. If anyone is looking for paid help, I am open for discussions. PHPRunner is a great product. The more you learn the more you can easily tweak into a specialty niche market products.

E
electromotive author 6/23/2010

Hi Dale. Thanks for your reply. I looked at your test site. Excellent! Yes, the radio buttons selects and other little features like the help tab, and icons for advanced search, etc, are very cool. Working the templates is a great idea for advanced players & code cutters.
It's been so long since I've looked through the business templates supplied with PHPR that I forgot what's there. Several of the templates have examples the filters I need.
Thanks, Rick