How to avoid two entries in form table

Mani SJ asked on July 28, 2022 13:02

I have a form built using form builder. When I submit the form records are inserted twice(same records with 2 different Id). I checked with sql profiler two insert statements are called. How can I avoid this?

Correct Answer

Mani SJ answered on July 29, 2022 11:48

BizFormItemEvents.Insert.After helped instead of BizFormItemEvents.Insert.Before

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on July 29, 2022 05:41

Check the settings on the form itself to see what you're doing after the form is submitted. I'd suggest displaying a message or redirecting to another page.

There could also be some JavaScript causing problems. Out of the box, the form widget works 100% of the time for submissions without issue.

0 votesVote for this answer Mark as a Correct answer

Mani SJ answered on July 29, 2022 10:03 (last edited on July 29, 2022 10:50)

@Brenden Kehren there is an option to insert new record in recorded data tab of form. When I manually fill the form there and submit it inserts two record with different Id like how its happening in web page. I already had a display message after form submit changed that to another page. Still not helps. This form stayed same after kentico 12 SP to Kentico Xperience. when I create another form and insert data only one data inserted in the new form

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 29, 2022 14:30

Then your controls or custom validation or something how you've manually built that form is causing the problem. There is no reason to have to create a global event handler to use the OOTB form builder and widget.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.