This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Can a deleted multiple choice entry be recovered from the back end?


  1. williamansley
    Member

    Believe it or not, I just had a user delete a choice from a multiple choice field in a form that had already collected data without realizing that their data would be deleted at the same time. Apparently, they just ignored the warning, "Are you sure you want to delete this field? This action cannot be undone.All data collected by the field will be deleted as well." Or perhaps they didn't understand it or just plain didn't read it. In my experience, the final scenario is most likely; sometimes it seems as if the users I deal with never read instructions.

    Be that as it may, is it possible to recover this choice by editing the back end database? I looked at the DB in phpmyadmin, but I'm afraid I couldn't figure out how to do it, or even if it was possible. I have searched this forum, but haven't found anything helpful.

    Posted 8 years ago #
  2. jhinkle
    Member

    I could be wrong, but I believe that unless a backup of that database occurred before the deletion, there is no way to get that data back.

    Posted 8 years ago #
  3. williamansley
    Member

    @jhinkle: I believe you are right, but I thought it couldn't hurt to ask. Fortunately, the lost data in this case was not critical. I should also state that I have discovered that the user wasn't at fault here, the blame really should be assigned the Machform package. While you are warned if you try to delete an entire field that data may be lost, you receive no such warning when you delete a single choice from a multiple choice field. I reported this problem here:

    http://www.appnitro.com/forums/topic/urgent-no-warning-given-for-removing-multiple-choice-item-with-data

    Posted 8 years ago #
  4. jhinkle
    Member

    Ok, I figured out how to do it.

    It DOESN'T delete the data! What I had to do is go into the "ap_element_options" table and search for the form_id of the form that you're trying to fix. What you want to do is look for the "live" column title. Set the one you want to restore to "1" and it should show back up. And if you have deleted a whole question, it still saves that in "ap_form_elements" table and make sure the "element_status" is "1" in order for it to show up.

    Let me know how it goes!

    Posted 8 years ago #
  5. williamansley
    Member

    @jhinkle: It worked like a charm. You are a gentlebeing and a scholar! I greatly appreciate you taking the time to figure this out and sharing it with me. Hopefully, this will help others as well.

    Posted 8 years ago #
  6. AMurray
    Pro Member

    That solution is good to know, however, there is an option to permanently delete data - probably a little known option. In the configuration.php, there is a 'switch' to turn on the PERMANENT deletion of data from the database. This is off by default, and is a fail-safe for such situations like this.

    Posted 8 years ago #
  7. bjc
    Member

    Hmmm... this is interesting. I have noticed slower and slower performance on our server lately and decided to purge a bunch of old records thinking that might help... and free up some storage... maybe not!

    Posted 8 years ago #

RSS feed for this topic

Reply