How to create custom filter buttons

How to create custom filter buttons

aarontharkeraarontharker Posts: 41Questions: 11Answers: 0

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

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Obviously that live.dt instance isnt going to work.. if you just need to share large amounts of code, use pastebin

  • aarontharkeraarontharker Posts: 41Questions: 11Answers: 0

    @jLinux... Thanks for the input

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    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 that if ( ! isset( $_GET['...'] ) ) { $editor->where( ... ); } etc.

    Allan

This discussion has been closed.