disable new or delete enable only edit from php api

disable new or delete enable only edit from php api

pantareipantarei Posts: 3Questions: 0Answers: 0

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

Replies

  • colincolin Posts: 12,441Questions: 0Answers: 2,107

    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: 3Questions: 0Answers: 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: 12,441Questions: 0Answers: 2,107

    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: 3Questions: 0Answers: 0

    ok it's okay,
    very very thanks!

Sign In or Register to comment.