Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter MasterJuan

    (@masterjuan)

    I have an other question Tobias…
    There is any chance for Search field to be an autocomplete for a specifc column ?
    Let’s say that I want to search at my hidden column Product, so while typing to get a a few choices of the products.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, using that formula in Excel should work, TablePress itself does not support this particular one.

    Regarding the HTTP error: You should check which exact setting is causing this, in the PHP Error Log file.

    Regards,
    Tobias

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    regarding auto-complete: No, sorry, I don’t know a solution to that one. You would need a custom JS implementation for DataTables here.

    Regards,
    Tobias

    Thread Starter MasterJuan

    (@masterjuan)

    About performance issue with big tables, you could put all setting tabs exceprt from “Table Content” to another main tab. So if someone needs to change just Table Title or Decription Table, to do it easy, without waiting for his browser to respond.

    It’s not a direct solution but I think it will overcome a few delays ??

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I don’t really think that this would be a good idea, as it would separate content and settings too much.
    Also, it would not solve the speed issue in general, so putting energy into that is the best approach in the long run, I think.

    Regards,
    Tobias

    Thread Starter MasterJuan

    (@masterjuan)

    Hey Tobias,

    I am trying to extend Search field with autocomplete.

    I am calling these files into controller-frontend.php

    $js_file1 = 'js/jquery.datatables.min.js';
    $js_file2 = 'js/currency-autocomplete.js';
    $js_file3 = 'js/jquery-1.9.1.min.js';
    $js_file4 = 'js/jquery.autocomplete.min.js';

    Let’s say that I have an javascript array like this

    $(function(){
      var products = [
        { value: 'product1'},
        { value: 'product2' },
        { value: 'product3},
      ];
     // setup autocomplete function pulling from products[] array
      $('#autocomplete').autocomplete({
        lookup: products,
      });
      
    });

    <input type="search" class="" placeholder="" aria-controls="tablepress-14" id="autocomplete">

    I found where to load the external libraries and where to insert id attribute to the input element

    How to feed products[] array depending with the values of my hide column with products?

    It would be a pro feature, i would push it back to your project with my great pleasure!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    sorry, this is beyond the level of support that I can give here ??

    Some hints: Putting such code into the controller-frontend.php is not good. These modifications would be lost after a TablePress update. Instead, you should put them into a small custom plugin.

    As for feeding the products[] array: Depending on where your code is, you might have access to the $table['data'] array, which has these.
    A better approach might be to do this via JavaScript (to not print the column values to the page twice), i.e. to fill the array by looping through the table rows in JS.

    Regards,
    Tobias

    Thread Starter MasterJuan

    (@masterjuan)

    Thank you for the hints Tobias.
    For know i just want to test it. Afterwards, I did it like a small custom plugin.
    I will give a try with hint and I let you know about the results!

    Thanks again!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    great, sounds good! ??

    Best wishes,
    Tobias

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Column Filter above Table header’ is closed to new replies.