checkbox serverside filter. im using ssp.class.php

checkbox serverside filter. im using ssp.class.php

hashsalacophashsalacop Posts: 19Questions: 5Answers: 0
edited August 2019 in Free community support

Right now I have this code. and it's working but when I check my first check it's working. I want to use checkbox filter to query all the needed values, Like I want to use multiple values in one column I check the check-01 check-03 and check-06 checkbox example d.columns[136].search.value = (01|03|06) but it's now working if I check all of them. right now here is my code.

 "ajax": {
                  dataSrc: "data",
                  url:    "serverside.php",
                  type:   "POST",
                  data: function (d)  {
                            var filter = [];
                             $('.form-control-2').each(function (index, elem) {
                               if (elem.checked) filter.push($(elem).val());
                              });  
                             var filterdata = filter.join('|');
                             d.columns[136].search.value =  filterdata
                             return $.extend( {}, d, {
                         
                               } );
                  

                         },
                       },

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @hashsalacop ,

    Is this the same question that was answered on this thread?

    Cheers,

    Colin

  • hashsalacophashsalacop Posts: 19Questions: 5Answers: 0
    edited August 2019

    Hi, @colin can you please give me an idea where can I start. thanks for this help. However every time I ask this question your just giving me this link. and really don't have an idea what do mean. i was checking the link a lot of times but it does not answer my questions.

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @hashsalacop ,

    As Allan said in that other thread, you need to modify the script with the SQL he gave. If you want specific support for your scripts, we offer a number of support packages.

    Cheers,

    Colin

This discussion has been closed.