Okay
  Public Ticket #3834979
Frontend editing with approval before changes take effect
Open

Comments

  • John Daniel Jarvis started the conversation

    My question is concerning: Front End Editing a sql based table I understand you can restrict who can edit information but if editing a sql datatable when the approved editor makes changes, can a editors changes be held for a admins subsequent approval before the changes take effect in the wordpress database? (and/or) can the changes made be noted so they can be checked?

    The reason for the question: even the most competent editors can make mistakes that can unnormalize data in the database. (IE) change of a data format like a phone number having brackets around a areacode (123)555=4444 and they input 1235554444 ....????.... we have a huge user database that collects 60+ pieces of information per user. 

    Thank for any insight you can offer.   

  •  1,887
    Miloš replied

    Hello,

    I searched through all our available working examples with hooks, but unfortunately, we don’t have a specific example for this particular use case.

    However, we can share some advice from our developers that might help you get started:

    In our plugin, you can check the following file:

    wp-content/plugins/wpdatatables/controllers/wdt_ajax_actions.php

    Around line 252, where the wdtSaveTableFrontend method is located, you’ll find these hooks:

    Actions:

    • wpdatatables_before_frontend_edit_row
    • wpdatatables_after_frontend_edit_row

    Filters:

    • wpdatatables_filter_frontend_formdata
    • wpdatatables_filter_formdata_before_save
    • wpdatatables_query_before_save_frontend

    These hooks allow a developer to manipulate user-entered data.

    This is the extent of the guidance our developers can provide. Implementing a custom solution beyond the built-in functions of the plugin would require additional development work, which falls outside the scope of our support.

    It’s likely possible to achieve this with custom coding, but our developers are currently focused on priority tasks, including bug fixes and improvements, so they won’t be available for custom work in the near future.

    If you have coding skills, you can certainly follow our Developer's Handbook Documentation to find custom examples and hooks.
    Our devs will keep updating it with more examples over time.

    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