• Resolved bcorchiolo

    (@bcorchiolo)


    I am trying to change the search to be case Insensitive so that EL14027 and eL14027 show the same results.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Which filtering method are you using here? Is this based on the TablePress Row Filter Extension? If so, that does normally use case-insensitive filtering… You could try setting that again by adding the Shortcode parameter

    filter_case_sensitive=false
    

    to the (I believe you are using that) [table_filter ... /] Shortcode.

    Regards,
    Tobias

    Thread Starter bcorchiolo

    (@bcorchiolo)

    I am using [table id=8 datatables_columnfilter=true /] filter_case_sensitive=false doesn’t seem to change the results.

    Thanks

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I’m confused now… I don’t see the Column Filters on this page. I only see an “Order Tracking” search field into which I add “EL14027”. Then, I see a one row table.

    Which exact search/filtering do you mean? That of this order tracking? If so, what technical solution is behind this? It seems to be a custom extension to TablePress.

    Regards,
    Tobias

    Thread Starter bcorchiolo

    (@bcorchiolo)

    I inherited this site, so I’m working my way through it. You enter a term into the field and you then the page you end up on another template page with

    <?php echo do_shortcode(‘[table id=8 datatables_columnfilter=true /]’); ?>

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, thanks! There must be some other code somewhere though (maybe in a custom plugin or in the theme) that does the original filtering (via that “OrderNumber” URL parameter) as that’s not a standard TablePress feature.

    Regards,
    Tobias

    Thread Starter bcorchiolo

    (@bcorchiolo)

    Yes, it appears that there is some js in the footer. Is there an easier way to do this?

    if(id_num == ‘el’){
    jQuery(‘.tablepress tfoot tr .column-2 input’).val(‘<?php echo $_GET[‘OrderNumber’]; ?>’);
    jQuery(‘.tablepress tfoot tr .column-2 input’).keyup();
    } else {
    jQuery(‘.tablepress tfoot tr .column-5 input’).val(‘<?php echo $_GET[‘OrderNumber’]; ?>’);
    jQuery(‘.tablepress tfoot tr .column-5 input’).keyup();
    }

    jQuery(‘.loader’).hide();

    //var poList = [];

    jQuery(‘.tablepress tbody tr’).each(function(index){
    //poList.push(jQuery(this).find(“.column-5”).val());
    if(id_num == ‘el’){
    var tableValue = jQuery(this).find(“.column-2”).html();
    }else{
    var tableValue = jQuery(this).find(“.column-5”).html();
    }

    tableValue = tableValue.toString();
    orderNum = orderNum.toString();

    if(tableValue.trim() === orderNum.trim()){
    jQuery(this).css(‘display’, ‘table-row’);
    } else {
    jQuery(this).remove();
    }

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ah, yes, this looks like it.

    In that code, please try changing the lines (in the lower part)

    tableValue = tableValue.toString();
    orderNum = orderNum.toString();

    to

    tableValue = tableValue.toString().toLowerCase();
    orderNum = orderNum.toString().toLowerCase();

    Regards,
    Tobias

    Thread Starter bcorchiolo

    (@bcorchiolo)

    Perfect, thank you so much!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Case Insensitive Search’ is closed to new replies.