Okay
  Public Ticket #2398509
Filtering for "grade range strings"
Closed

Comments

  •  2
    Larry started the conversation

    Our client has a database (actually CSV file) with a "Grade" column that contains a "grade range string" of grades that a book is suitable for. Examples might be:

    "K-3"

    "4-8"

    "PreK-2"

    "PreK-K"

    "3-12"

    etc.

    In general, this is a "numeric range" where "K" = "0" and "PreK" = "-1".

    Ideally, they would like visitors to type "2" in a "Grade" filter and include items with ranges such as "K-3".

    I've told them that one way to do this is to make "Min. Grade" and "Max. Grade" columns and just use numbers. Then wpDataTables can handle this with standard features.

    They have asked me to investigate with you the possibility of creating a custom filter type (e.g. "grade range") that would do what they want in a single column. Do you see a reasonable path toward doing this? Is this something we could pay you to develop? Or would you support us with a few pointers in the right direction?

    Thanks in advance for your help with this!

  •  2
    Larry replied

    Another possible path would be to have a hidden column with all the choices enumerated (e.g. "K, 1, 2" or "3, 4, 5, 6, 7") and then a displayed column with the ranges (e.g. "K-2" or "3-7"). Then the trick is just having the displayed column filter operate on the enumerated column's data. Not sure that's any easier, but maybe.

  •  2,507
    Aleksandar replied

    Hi Larry

    I haven't tried this, but you may be able to add numerical values to that column, and change what they look like in the table using Conditional Formatting.

    I'm not sure if this would work, though due to the fact that you've already pointed out to your clients - numerical columns are quite sensitive and they don't accept non-numerical data.

    If this doesn't work, I'm afraid I can't be of any further assistance. 

    It probably can be done with some custom work, but our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in near future.

    But we can recommend these services for customization:

    https://codeable.io/?ref=l1TW1

    https://wpkraken.io/?tms-plugins

    They do develop such solutions, so can you please send your inquiry to them?

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables