• Resolved master331

    (@master331)


    is it possible to delete record directly on site? maybe by adding button or some link
    for example od page where is [pdb_record] shortcode?

    • This topic was modified 8 years, 1 month ago by master331.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author xnau webdesign

    (@xnau)

    I have an article on my site that explains how to do this:

    Putting a Delete Switch in the Record Edit Form

    Thread Starter master331

    (@master331)

    @xnau
    this is from link which you sent to me

    “The easy (no code needed) and recommended way to do this is to create a checkbox field that when checked, marks the record for deletion. The actual record deletion (if that is what you want to do) takes place in the backend where an administrator can easily delete multiple records.

    To prevent records that are supposed to be deleted from showing up, they can be filtered out of the list display using a shortcode filter, something like this: [pdb_list filter=”delete!yes”]

    The main reason this is the recommended way to implement this feature is that once a record is deleted, it’s gone forever. If there happened to be an accidental deletion, it will be nearly impossible to restore that record. Another reason is that sometimes, as a site administrator, you want to retain that data in case it’s needed in the future.”

    I created field Delete Record (title is delete_record) and set it to checkbox with two values (yes, no)

    now i want to put delete button to page where code [pdb_record] is located.
    i put this code [pdb_record filter=delete,”yes”]
    and when i check delete box and click save i only get message “YOUR INFORMATION ARE SAVED” and record is not deleted.
    can you edit my code which i put above in this reply?

    Thread Starter master331

    (@master331)

    Thread Starter master331

    (@master331)

    @xnau

    sir you are GREAT GREAT GREAT!
    i used your callback function and code [pdb_record filter=delete,”yes”] and it is working!
    THANKS A LOT

    Plugin Author xnau webdesign

    (@xnau)

    glad you got it working…any other question on this topic?

    Thread Starter master331

    (@master331)

    no you can close topic, i resolved problem.
    cheers

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Deleting record directly on site’ is closed to new replies.