How to create custom filter buttons
How to create custom filter buttons
aarontharker
Posts: 41Questions: 11Answers: 0
in Buttons
I have an editor table set up where the data is being filter with 2 where clauses. I want to be able to have a custom button that will reload the table minus one of those where clauses.
http://live.datatables.net/magodeye/1/edit?html,js
essentially I want the custom button to make it so "->where('hm_members.user_type', '7', '>')" is ignored but I can't think how to achieve this. Anyone have any ideas?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Obviously that live.dt instance isnt going to work.. if you just need to share large amounts of code, use pastebin
@jLinux... Thanks for the input
What you would probably need to do is send some extra information to the server to tell it that it should ignore a specific condition - the
ajax.url()
method for example could be used to set a GET parameter on the URL. The PHP script would then check for thatif ( ! isset( $_GET['...'] ) ) { $editor->where( ... ); }
etc.Allan