Okay
  Public Ticket #2863869
Chose what column to see
Closed

Comments

  • Popoviciu Adrian started the conversation

    Hi,

    Can you maybe help me with another question?

    I want that one type of user to not be able to see all the column in the wpDataTable, ex. price of transport. It is possible to make this happen?

  • [deleted] replied

    Hi Adrian

    Thank you for reaching out to us.

    Unfortunately it is not possible to hide specific columns from a particular user role.

    You can link data to specific users though. To do this the table needs to be editable (so you would need to import the file, to create a manual table), and also you need to have the User ID field in the table. Meaning, if John has user ID = 5, when he logs into your WordPress site, and looks at the table, he'd only see his data if you selected the User ID column as the "User ID column" in the Editing tab above the table. If there's no user ID column, and they aren't logging into WordPress, this will not work.

    You can also add the placeholder %CURRENT_USER_ID% as the predefined filtering value in column settings of "User ID" column, and the table will automatically be filtered per the ID of the currently logged in user. You can enable the Show all rows in back-end option from the Editing tab of the table to see all entries in the back-end. You can also edit the table but if you edit the table as an administrator your User ID will be saved when you make the change so make sure to turn off the Users see and edit only own data option before editing.

    8572558340.png

    Please see the video below

    How to create editable tables in WordPress where users edit only own rows - wpDataTables 2.0

    If you want to have a specific column shown for all users you will have to add user ID number 1 next to each one of the values in that column, then copy and paste the same row values below and add user ID number 2 next to them and so on for as many users as you have. You can use the Excel like editor to copy-paste the values so you wouldn't have to add them manually one by one.

    4868874550.png

    You can set this column not to be editable by setting Editing to None, so the users will be able to add the data in the empty fields only.