write data from a form to the CMS database including uploads creating two entries

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 6, 2022   (RSS)

By craig_bcd - October 6, 2021

Hi - 

We are using CMS builder to record covid vaccination information for pre-hire employees and I am using the uploadForm3_add code to upload vaccination card images.  Ultimately I want to send an email to the HR department that includes the vaccination information as well as the uploads but I am running into an issue.   When you click the upload button in the iframe it does upload to the database but then when you submit the form it creates a second record rather than writing it to the same record even though they have same tempid.  I am guessing the issue is once it uploads the images to the CMS the temp id ceases to exist and but I don't know how to counteract this. 

Any help is appreciated. 

Thanks!

Craig

By daniel - January 6, 2022

Hi Craig,

I believe that uploadForm3_add.php is meant as a standalone example for creating a form that uploads a file. If you want to include a file upload into an existing form (covidvax.php) you should be able to just point the iframe directly at uploadForm3_iframe.php.

Let me know if that helps solve the issue!

Thanks,

Daniel
Technical Lead
interactivetools.com