How to clear a signature field before editing entry or after saving edited entry

By: Jane Onorati | Asked: 01/15/2025
ForumsCategory: Code HelpHow to clear a signature field before editing entry or after saving edited entry
Jane OnoratiJane Onorati asked 14 hours ago
I have a profile form and depending on what fields the user edits, they may need to re-sign their waiver agreement on the form. If the user already has a signature in the field, then I need to clear it before they sign it again. I can't find anything in Formidable's support docs that addresses this. It appears what is generated on the form is just a div with the signature in it in the place of the signature field. So maybe it can't simply be cleared, instead the div needs to be replaced by the empty signature field. Just spit-balling here. Has anyone cleared a signature field programmatically before or have any ideas how this might be accomplished?
Jane OnoratiJane Onorati replied 13 hours ago

Okay, I looked in the database and found that if a signature has not been created, a row does not exist in the frm_item_metas table. I deleted a row with a signature value in that table and that did the trick. So, now I know I can run an sql command from a php script to delete signatures. I did also find the function delete_entry_meta( $entry_id, $field_id ) in the Codex on the Formidable Masterminds site so will try that first.

1 Answers
Rob LeVineRob LeVine answered 5 hours ago
For any field that has a value, regardless of its type, there's a an entry in frm_item_metas and you can either update it to "" or, as you noted, delete the entry. A field can have an empty value, unless it's being inserted, in which case Formidable doesn't even create the empty entry.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right