HTML5 File Upload Support Product Page
Answered
Upload and store data for 2 different fields
Asked 30 Nov 2017 13:57:37
1
has this question
30 Nov 2017 13:57:37 Miguel Quintero posted:
Hi there we have a system that we need 2 file fields one is for pdf and the other one is for a picture, I followed the videos here but there is no example for 2 different fields, I tried the conditions but it seems it only saves the name of the last upload, how can this be done with this tool?This is not a multi upload of a bunch of pictures each field has a specific function so there is no making a new table for the upload of these.
Replies
Replied 30 Nov 2017 14:03:58
30 Nov 2017 14:03:58 Teodor Kuduschiev replied:
Hi Miguel,
Could you please clarify what exactly needs to happen?
Could you please clarify what exactly needs to happen?
Replied 30 Nov 2017 15:30:28
30 Nov 2017 15:30:28 Miguel Quintero replied:
got it done, just it seems to be more steps than like we use to build stuff before on dreamweaver like that thing of adding an update record for each condition if the file exist or not.
But to answer your question, I got a a table on the database that keeps a name, a profile picture and a pdf of a resume, this is an old thing and im told not to add or change the tables, so i have 2 upload fields one for the picture one for the pdf also it has the name field email etc.. that are just text fields, so i needed to upload 2 different files for those 2 separated fields
But to answer your question, I got a a table on the database that keeps a name, a profile picture and a pdf of a resume, this is an old thing and im told not to add or change the tables, so i have 2 upload fields one for the picture one for the pdf also it has the name field email etc.. that are just text fields, so i needed to upload 2 different files for those 2 separated fields
Replied 30 Nov 2017 15:38:24
30 Nov 2017 15:38:24 Teodor Kuduschiev replied:
Hi Miguel,
You just need two upload steps in Server connect and one insert step after that. So bind one upload step value for one field, and the other upload step value for the other field.
You just need two upload steps in Server connect and one insert step after that. So bind one upload step value for one field, and the other upload step value for the other field.
Replied 30 Nov 2017 17:01:02
30 Nov 2017 17:01:02 Miguel Quintero replied:
I am having an issue with it, since this has an php update behavior, if i do not select a file I have the conditions there but it seems that if i upload the pdf it adds null to the other field not sure why
Replied 01 Dec 2017 06:48:00
01 Dec 2017 06:48:00 Teodor Kuduschiev replied:
Hi Miguel, i am not sure i understand what exactly do you have on your page and when exactly it adds null? Is it possible to explain this please?
Also what is php update behavior?
Also what is php update behavior?
Replied 01 Dec 2017 14:16:43
01 Dec 2017 14:16:43 Miguel Quintero replied:
Hi again Teodor thank you for your responses so I have a DMXzone server connection that connect to a mysql database, this fill sin the input fields for each text box, this is for an update page, on this update page I have 2 fields one for a picture and one for a pdf, the upload works fine the issue is saving the data in the database so following the upload video here, I created 2 file uploads in them I created a condition
- File Upload: upload1
- - Condition {{upload1.error==4}}
- - - than Step database update without including any of the file fields
- - - Else Step database update all fields less the pdf field (upload 2 input)
- File Upload: upload2
- - Condition {{upload2.error==4}}
- - - than Step database update without including any of the file fields
- - - Else Step database update all fields less the image field (upload 1 input)
So when I upload a picture it clears the pdf field in the database adding null, if i upload a pdf it clears the picture field adding null to it
- File Upload: upload1
- - Condition {{upload1.error==4}}
- - - than Step database update without including any of the file fields
- - - Else Step database update all fields less the pdf field (upload 2 input)
- File Upload: upload2
- - Condition {{upload2.error==4}}
- - - than Step database update without including any of the file fields
- - - Else Step database update all fields less the image field (upload 1 input)
So when I upload a picture it clears the pdf field in the database adding null, if i upload a pdf it clears the picture field adding null to it