Okay
  Public Ticket #3538125
Display boolean fields in checkboxes
Closed

Comments

  • Daryl started the conversation

    Is it possible to display boolean (true/false or yes/no) fields (usually tinyint in the database) as checkboxes in tables and on edit screens?

  •  1,708
    Miloš replied



    Hi Daryl,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets.

     I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    Sorry to disappoint you on this, but, since it is not possible to have true boolean values in the source SQL Database Table, our Plugin can only do "Conditional Formatting" to transform your 'final cell value' , for example from 0 to 'false', and from 1 to 'true';

    like this, in my example, i tried making an SQL Table in the Database that contains a "tinyint" Field and set 0 and 1 as possible values;

    Then in my Table, i can place two Conditional Rules :

    - If any cell value is 0, transform this cell content to show as "false";

    - or if it is 1 , transform to 'true';

    but this works only in the table cells -  

     for a CheckBox filter , or during Editing - our Plugin will show the actual value exactly as it is coming from the source Data/  0  or 1.

    1581541475.png
    8252987473.png
    8602672020.png
    9158229126.png
    3269125700.png


    So, at this time, the only way to have "true" or "false" show as possible filter or editor value, is to have them like that coming from your Source Data.

    This is an interesting idea for a future option, though,  so you can make a development suggestion, i just can't say an ETA if or when something like that might be possible for filtering/editing values.


    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.

    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)


    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