error handling

By: Roger Weiss | Asked: 04/21/2022
ForumsCategory: Code Snippetserror handling
Roger WeissRoger Weiss asked 3 years ago

Hi,

I'm using a php code snippet to process the data and update the database. But, if I find an error in the data, I want to exit the code, display an error msg and NOT complete the form processing. i.e. not send the emails that get sent upon completion of the transaction.

How would I exit the snippet and signal Formidable that it should stop processing?

Thanks,

Roger

2 Answers
Victor Font answered 3 years ago

Formidable has validation hooks you could use. They are design to address the very problem you're trying to solve. See these pages: https://formidableforms.com/knowledgebase/frm_validate_entry/ and https://formidableforms.com/knowledgebase/frm_validate_field_entry/.

Roger WeissRoger Weiss answered 3 years ago

Thank you.

Yes,I knew about this, and was thinking of handling the error process a different way.

But, the lightbulb went off and doing it this way is way easier, so thanks for the inspiration.

Roger

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