The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Delete Old Form Entry on Form Submission
Hi Guys
I'd like to be able to delete an older entry on form submission. I was going to use this hook https://formidableforms.com/knowledgebase/frm_after_create_entry/ to instantiate the deletion of the old entry. The old entry would have been made in the past 6 weeks and match the users email address that they entered into the form.
I was just wondering is there a standard Formidable function I can make use of for deleting a particular entry in a formidable form? Other wise I was just going to write a custom sql statement to delete the form entry from the database.
Thanks
January 16, 2019 at 6:20 am
You can try using FrmEntry::destroy( $id ). You have to know the ID of the old form entry for this to work.
January 16, 2019 at 5:48 pm
Hi vfontjr
Greatly appreciate your reply, I'll give that a go.
Do you know if there is also a function for searching for a form entry? If not I'll write an SQL for doing the search.
Cheers
January 17, 2019 at 8:08 am
I thing searching requires your own SQL, especially since you appear to be basing your search on user's email address. You'll have to search frm_item_metas where the actual field entry data is stored.
January 17, 2019 at 4:29 pm
Hi vfontjr
I figured this might be the case. Thanks for your input :D
Discussion closed.