The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Uploading File - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Uploading File (/showthread.php?tid=658) |
Uploading File - ra1874 - Apr 15th, 2010 Hello all, I have a problem with getting the upload to work properly when I submit my form (http://equaloppemployment.com/forms/files/jobpost.html). I've included this in my file: <form action="http://equaloppemployment.com/forms/process.php" method="post" enctype="multipart/form-data"> However, I am able to upload the file via the Form Tools admin interface. After I submitted my form, I checked the database and all the fields are stored correctly except the "file" field. It remains empty even though I've already specified a file when I submit my form. What should I do? Thanks in advance, Renold RE: Uploading File - Ben - Apr 18th, 2010 Hi Renold, Is this an API form or a POST form? If it's an API form, make sure the $params variable you're passing to the ft_api_process_form() function contains the following key-value pair: "file_data" => $_FILES Also, when testing it, are you trying to upload the same file as the one that was successfully uploaded via the Form Tools UI? - Ben RE: Uploading File - ra1874 - Apr 28th, 2010 (Apr 18th, 2010, 4:54 PM)Ben Wrote: Hi Renold, Hello Ben, It's a POST form. I was trying to upload the same file that was successfully uploaded using the Form Tools UI. What am I missing? Thanks, Renold RE: Uploading File - Ben - May 1st, 2010 Hey Renold, If it's working via the Form Tools interface, that means it's not a server configuration problem - which is very nice! That's usually the biggest hurdle. I'd check the name attribute of the file upload field in your form is *exactly* the same as the value shown in the Edit Form -> Fields tab. Also, check it's alphanumeric with no spaces, dashes or anything else. Other than that... I'm not sure! Let me know. - Ben |