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?
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?
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
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
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?
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?
Hi rmenon,
You can disable the Submit button with JavaScript but my Anti-Flood [GH] action is probably simpler to add and use.
Bob
You can disable the Submit button with JavaScript but my Anti-Flood [GH] action is probably simpler to add and use.
Bob
This topic is locked and no more replies can be posted.