• Resolved WelcomeHomeJoe

    (@welcomehomejoe)


    Hello,

    Is it possible to put text into a cell, hide the column and still have the text searchable? Here is what I have…..I have a database, the last column is keywords, there can be a lot of keywords so I want to hide them. But I want the user to be able to search the database by keyword and find results. Right now, if I hide the column, then search for one of the keywords, the results don’t show up. Is there a way to show the results from a hidden column?

    Hope I explained it so you can understand it.

    Thank You,

    Joe

    http://wordpress.org/plugins/tablepress/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Joe,

    thanks for your question and sorry for the trouble!

    Just to be clear, I assume that you are refering to the search box in the top right corner? Then, you are right, a column that is hidden via the “Edit” screen of TablePress (so that it appears with a red background) is not searchable by that, as it is not part of the final table.
    To achieve that, you can instead hide the column with a different method:
    1. Please unhide the column on the table’s “Edit” screen.
    2. Add this to the “Custom Commands” textfield on the table’s “Edit” screen:

    "aoColumnDefs": [ { "bVisible": false, "aTargets": [ 6 ] } ]

    In that code, adjust the 6 to the desired columns number minus 1 (i.e. 6 indicates the 7th column, as counting starts with 0 in that code).

    Regards,
    Tobias

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    Tobias,

    Thank You!! That worked great. The only issue I am having is that the search isnt finding all of the keywords in the field. Any ideas? I have about 20 keywords in the keyword column for each row. I am looking for keywords that I know are in the keyword field but it is coming up with no results. Is there a way to index the table perhaps? I will keep trying.

    Thank You,

    Joe

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    Tobias,

    I figured it out, I didnt refresh the page after I updated the table. I would like to thank You so much for your quick answer, you are awesome.!!!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    very nice! Good to hear that this helped, and that you were already able to figure out that small problem! 🙂

    Best wishes,
    Tobias

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

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Searching data in a hidden column’ is closed to new replies.