Okay
  Public Ticket #3711552
Changing Search Placeholders
Open

Comments

  • carl martin started the conversation

    I want to change the placeholder text in the search field, and I want it to be something different for each column. How can I do that? I upgraded to the pro version of the software because I thought the "Placeholders" function would allow me to do this. Thanks



  •  1,767
    Miloš replied

    Hi carl,

    1. If you mean the "Global table search", this is not linked to any specific column - it acts to search through all the column cells at the same time, so this is not possible.

    We can only have one 'global table search' placeholder.

    6162945718.png


    2. You can only change each Column's placeholder name for the advanced column's filters.

    You will see this in each individual Column settings/filtering/Filter label.

    9924424067.png
    1590176281.png


    3. Or maybe you meant each column filter's 'search placeholder' when you have dropdown filters and enable 'Search in selectbox/multiselectbox', to write a different column dropdown search placeholder individually.

    7580239994.png

    If that is the case, truly sorry to disappoint you, but at this time, we don't have any built-in solution to achieve this.

    You can suggest it to our developers, though - they will do their best to make a solution in the future.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    If you have coding skills and wish to try to make a custom solution now,

    you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.

    We also added this new developer's handbook, which can allow users with coding skills to make custom add-ons.

    Our developers will keep adding more custom hooks/examples there over time.


    Please be advised that custom solutions with hooks are not included in our support.

    You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.

    ( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)


    4. In terms of our 'Dynamic Placeholders' as per this Documentation, this is not related to what you need for this use-case.

    Those Placeholders can be understood as predefined “search and replace” templates that will be replaced with some actual values at execution time. They are usually used for MySQL queries, but you can also use them as pre-defined Column filter values.

    Here are some examples :

    1. If you have a MySQL query-based table, you can use this query:

    SELECT * FROM yourDatabaseTable
    WHERE columnName = '%VAR1%'

    %VAR1% can be defined in the Placeholders tab when you're creating a table, 

    or you can pass a different VAR1 value in the table's shortcode.


    2. Or, if you don't add the condition in an SQL query ( or don't use an SQL Table),

    you can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".

    Then, you can have different versions of the same table, with the VAR1 value passed in the shortcode,

    let's say if we had a "Regions" column and we wish to filter a different region per each page.

    9385158392.png

    If we want page 1 for example only filtered for "Region A" , you can set predefined filter to this column as %VAR1% (filter type has to be set as text) :

    4266306375.png

    Then for a page where we need only Region 1 filtered, use shortcode [wpdatatable id=1 var1='Region A'] ,

     page 2 for only "Region B", shortcode would be [wpdatatable id=1 var1='Region B'] and so on, 

    to apply the values defined in the shortcode to the filter.

    ( This filtering method can be used for any table type, besides Simple Tables)


    I hope that clarifies the use of the Dynamic Placeholders for filtering of tables and our current limitations for not being able to change each 'dropdown filter's' 'search placeholder' value.

    Let me know if you have any additional questions.

    Kind Regards, 

    Miloš Jovanović
    [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