Duplicate entries being saved in database on Edit

rmenon 07 Mar, 2013
I created a form with one of the elements being a file upload. I also built a feature to let users edit their submission and followed the instructions as per CFV4_db_multi_record_loader.pdf file to set this up.
However, if the user submits the data without uploading a file and then tries to edit their data and submit the file, the form creates duplicate entries in the database. I already have cf_id as a hidden field on the main form. What could be causing this issue?
GreyHead 07 Mar, 2013
Hi rmenon,

I can only suggest that you use the Debugger to see exactly what information is where. Provided that there is a valid primary key value in the $form->data array when the DB Save action runs then the existing record should be updated.

There are more complex problems in updating file entries in a database record but I don't think that is what you are asking about here.

Bob
rmenon 07 Mar, 2013
Thanks Bob!
Debug did not show any issues. Checked backed with the user. She said there was a lag and she clicked the submit button multiple times which caused the duplicate entries.
Is there any way we could disable the 'Submit' button after first click until the page refreshes?
This topic is locked and no more replies can be posted.