iceman101184 / ajaxcrud

AjaxCRUD - Manage mySQL Database with PHP and a few lines of code!
http://www.ajaxcrud.com
72 stars 42 forks source link

Added new methods to disable filter boxes #15

Open apmuthu opened 5 years ago

apmuthu commented 5 years ago

Checkout my commit at: https://github.com/apmuthu/ajaxcrud/commit/9eba475f09ef5c5552466402205b0d08a2083375

    function disableAjaxFilterBox($field_name){
        // Sequence of method usage: beware Filter fields added after this removal
        if (in_array($field_name, $this->ajaxFilter_fields)) {
            $key = array_search($field_name, $this->ajaxFilter_fields);
            unset ($this->ajaxFilter_fields[$key]);
        }
        if (in_array($field_name, $this->ajaxFilterBoxSize)) {
            unset ($this->ajaxFilterBoxSize[$field_name]);
        }
    }
    function disableAjaxFilterBoxAllFields(){
        foreach ($this->display_fields as $field){
            $this->disableAjaxFilterBox($field);
        }
    }