disable new or delete enable only edit from php api

disable new or delete enable only edit from php api

pantareipantarei Posts: 4Questions: 1Answers: 0

Hello,
it's possible disable new or delete records, and enable only edit records from php api?

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This example here shows the PHP script where preRemove returns false, meaning it doesn't happen. Likewise, there's a preCreate. You could have that on the back-end, and in the front-end just don't displayed the create and delete buttons.

    Colin

  • pantareipantarei Posts: 4Questions: 1Answers: 0

    Thanks for the reply,
    but, I would need to do it from the Backend (php), as you could still make a post via an http request by passing the frontend.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I forgot to add the link in my previous reply, apologies for that - this is it here: https://editor.datatables.net/examples/api/softDelete.html

    The events I'm referring to are backend events - if you look at the "Server script" tab below the table, you'll see the code there.

    Colin

  • pantareipantarei Posts: 4Questions: 1Answers: 0

    ok it's okay,
    very very thanks!

This discussion has been closed.