Okay
  Public Ticket #3338823
filtering and editable column
Closed

Comments

  • Douglas Milligan started the conversation

    I have a column set to editable which is what I need for my 1st page, but I need it to be non-editable when I display my 2nd page.  How can I change the column from editable to non-editable using code or url or shortcodes?

  •  1,849
    Miloš replied

    Hi, Douglas.

    Sorry to disappoint you, but we do not have an easy solution with our current built-in capabilities to achieve what you described with one table.

    If you wish to see a solution for this 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.

    -

    Right now, i am thinking of any workarounds,

    1. You could try to use custom CSS to hide the particular column from the Editing Modal only on the 2nd Page, if you wish to use the same table.

    For example, if i have a table like this, with some client dummy data, and if i wish to hide this highlighted column "Account Number" from the Editing Modal just on a specific page :

    9619252375.png

    8957255333.png

    I will use this CSS for my table :

    .wpdt-c .modal#wdt-frontend-modal.wdt-skin-aqua .modal-dialog .modal-content .modal-body .wdt-edit-dialog-fields-block .form-group:nth-child(8) {
        display: none !important;
    }

    But to elaborate how we got to it;

    First, we open the Editing Modal on the page with the table, 

    and since all these Editing columns have the same class, 

     we can use the CSS :nth-child() Selector, in order to pick out the right one.

    On my table, it is the 8th child in a row,  but in your table it might be a different "child number".

    You can start with giving this selector a red color background and start with the first "nth child" :

    .wpdt-c .modal#wdt-frontend-modal.wdt-skin-aqua .modal-dialog .modal-content .modal-body .wdt-edit-dialog-fields-block .form-group:nth-child(1) {
        background : red !important;
    }

     then you can check which of the editing columns turns in red background,

    keep changing the nth child number in brackets until you reach the right Editing Column "nth child" selector number,  

    and change the CSS property to "display:none" which will hide that column from Editing on the page.

    4640575882.png

    5176237464.png

    Custom code needs to be applied to the page where the booking form is. Depending on what you're using (Gutenberg blocks, or some page builder), adding the CSS or JS can be done in a few different ways. 

    If you need help with adding custom CSS to the page, please take a look at this article.

    -

    I am guessing that you maybe already have some HTML/CSS skill,

     if that is the case, my apology if that was too many unnecessary details.


    2. Or you might try an option to have two tables.

    It depends from the table type, for example if you use SQL based tables,

    you could make one main Manual Table which holds all data,

    check under the Editing settings for the MySQL Table Name,

    then make another SQL Table from it, e.g. "Select * From Table_Name"

     - it would pull the same data and editing of one table will store in the same data in the database;

    but you can manipulate which table's column is editable,

    and on the other table you can set Editor Type to "none" for that column, and set this table's shortcode on Page 2.

    -

    That's about all i could think of with the current plugin capabilities.

    I hope this helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  • Douglas Milligan replied

    Would it be possible to have 2 views of the table where the column was set to be editable on one but not the other?

  •  1,849
    Miloš replied

    Hi, Douglas.

    It is not possible to do have one/same table with "two views" that would allow a column to be Editable in one "view" while being non-editable in the other "view" from same table.

    At the moment, the only possible two workarounds could be as i mentioned :

    1. You can apply custom CSS which will hide the Column from Editing Modal on Page 2,  while on Page 1 you can have that column show as editable in the Editing Modal.

    2. Or you can make a "duplicate" SQL table, 

    for example if your main table would be a Manual Table,

    check under "Editing" for the "MySQL Table Name",

    then make another SQL Table with Query :  "SELECT * FROM Table_Name" ,

    and in that other SQL table you can set this column as "non editable", ( Editor Type as None)

     and set this SQL Table shortcode on Page 2, where you wish this column to be non-editable,

    while on Page 1 set the Manual table shortcode with editable Column.

    -

    Those are the only two methods at this time, but we will do our best to come up with better/improved features in the future.

    Let me know if that makes sense.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  • Douglas Milligan replied

    You may close this ticket.

  •  1,849
    Miloš replied

    Hi, Douglas.

    No problem, we will close this one.

    Please don't hesitate to open new tickets for anything else that might come up.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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