Okay
  Public Ticket #3107509
Front end editing by user
Closed

Comments

  • Mark started the conversation

    The website for the Virginia Genealogical Society currently exists on the ENS platform, but I am currently working on a project to replace that using a Wordpress platform.

    I want to build a table for users by importing some data from either Excel or CSV, with the %CURRENT_USER_EMAIL% variable, which corresponds with their email address in Wordpress.

    This table is for genealogical information such as surnames they are researching, locations, etc.

    I understand there is an option to set front-end editing to allow users to only see and edit their own data. What I would like to do is allow them to see all the data, but only edit their own.

    Is there a way to do this?

    Thank you, 

    Mark

  •  1,568
    Uroš replied

    Hello Mark,

    Thank you for reaching out to us.

    Here is an example i made with a Clinic table.

    You have to create a custom column, and name it how you wish, in this example I named it user ID.

    First I made a table named Clinic_copy.

    9060471295.png

    Then I made a new column, user ID. 

    Now, this is the most important detail. When you select ID column for editing, in this case wpDataTables automatically guessed the right column - it will be wdt_ID, this Is the row identifier. Every row has its unique ID. Please check this screenshot :

    7863918915.png

    - Then, when you select the user ID column, this is the User identifier. It must be an integer field, and this field is going to be automatically populated, by the currently logged user ID, when they create a new entry.

    3868223118.png

    This user credential for user "casuality " has user ID 3  in the wp_users database table.  

    Here is an example, when I am logged in as Administrator, the user ID is 1, this is our Placeholder section, showing the current user ID :

    5429141708.png

    -

    Then, I made a Test page, and placed this Copy Clinic Table there.

    When I log out of Admin and log in as a user  causality, as I input a new row, that user can only see the rows he made ( as mentioned earlier, this user ID is 3) :

    8005514896.png

    then every row that user casualty makes, is going to have user ID 3 in this column.

    I hope that I explained everything clearly.

    Kind Regards, 

    Uros Jovanovic
    [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

  • Mark replied

    Hi, Uroš

    Thank you for the detailed reply. 

    I think I understand how to set it up so that the user can only see and edit their own data, but remember I want the complete table, with any new data, to be seen by everyone.
    I only want to limit editing to own data.

    I think the thing that is throwing me off is the "User see and edit only own data" section.
    If I display the table on the page, that implies to me that users can only see their own data, and can edit it.
    However, in the field of that section it says "Limit editing to own data only".

    So the question is, does it work like this:

    If I have a table with "User see and edit only own data" box checked, can any user see the whole table?
    But when they click on Edit, the only data they will see (and can edit) is their own data, as shown in your screenshot of the 'Clinic_copy' table?
    Then the whole table (which can be seen by everyone) will reflect those edits.

    (I do have the Master Details add-on, if that makes any difference.)

    Regards,

    Mark



  •  2,572
    Aleksandar replied

    Hey Mark

    If you enable "Users see and edit only their own data", they won't be able to see everybody's data, only their own.

    At the moment, there's no way to show all data, but enable them to edit only their own entries. This is something we will work on in the future, and you can add it to our Feature Suggestions page, but at the moment it's not possible to achieve this.

    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