Home › Forums › Quform PHP › Upload problem for Quform – Responsive Ajax Contact Form
- This topic has 4 replies, 2 voices, and was last updated 11 years, 5 months ago by Ally.
- AuthorPosts
- June 1, 2013 at 5:33 pm #4621franz1981Participant
Hello ! I bought the amazing “Quform – Responsive Ajax Contact Form” a few days ago and I’m very glad of it. I only have a problem for the file upload option I add to the contact form of one of the sites I’m building for a client (here : http://www.in-verbo-veritas.be/contact.php). The e-mail received states so : (for instance) “Upload image.jpeg (9.13 KB)”, but I don’t receive any attachement… Following the documentation (I know almost nothing about PHP…), I added the following code in the “process.php” file :
$upload = new Quform_Element_File(‘upload’); $form->addElement($upload); $upload->setAttach(false); $upload->getFileUploadValidator()->setMaximumFileSize(10485760);
I love your documentation, very precise. Nonetheless, about file upload, I find it rather vague. Indeed, it says “Add code to process.php to make the PHP code aware of your file element.” WHERE exactly in the file ?
Also, if it can help, my HTML for the file looks like this :
<div class="quform-element quform-element-file">
<div class="quform-spacer">
<label for="upload"><?php echo $document; ?></label>
<div class="quform-input">
<input type="hidden" name="MAX_FILE_SIZE" value="10485760" />
<input class="upload-element" id="upload" type="file" name="upload" />
<p class="quform-description"><?php echo $maxsize; ?></p>
</div>
</div>
</div>
Thanks very much in advance.
June 1, 2013 at 9:02 pm #4624franz1981ParticipantStupid me…. This is :
$form->addElement($upload); $upload->setAttach(<strong>true</strong>);
of course !That’s something you want to change in your documentation, as you say “false” there.
If you’re interested, I could send you a list of the few little mistaked I spoted in your documentation HTML page. Well, it’s already almost perfect 😉
As I resolved the problem myself, let me ask you my second and last question :
By any chance, do you know what’s wrong with FREE.FR server ? On a fun website I’m developping on this free server (here), I don’t receive ALL e-mails. Sometimes, 1 out of 10, sometimes 8 out of 10. Anyway, I will not propose a contact form if I don’t get every submission…
What could I do about this ? If i have to use SMTP method, what are the lines I’d have to write ? The few tries I gave to SMTP didn’t work (error on submit).Sincerely yours.
June 2, 2013 at 2:13 pm #4634AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 2, 2013 at 9:02 pm #4650franz1981ParticipantThank you very much for your nice answer (and sorry for my limited english which isn’t my mother tongue as you probably already noticed it).
I’ll send you that list and — as I’m a quite organized type of person ;> — I won’t forget to do so. You’ll get it soon ; I’m so happy with your amazing form (that worths many times its price…). For professionnal developers as your team, one wouldn’t qualify these imprecision as “mistakes” per say : what I have to highlight couldn’t be confusing for (confirmed) developers. However, I still reported it because those imprecisions could lead for profanes like me to incomprehension.
The mails I don’t receive aren’t sent in spam. I’m not sure for the emails limit set by Free.fr but in any case the behaviour is odd : I could receive 5 emails sent within a minute and do not get one single I send after several hours of pause.
I tried the SMTP code gave in your doc. But stupid me again… The recipient is my Gmail address, but I thought I had to set the SMTP for Free.fr (which didn’t work) because the site is on a Free.fr server. I’ll so try with the Gmail settings so (hoping that your files are well encrypted for security, since I’ll hace to indicate my password for my main email account.I forgot one last question. This time, this is really the last one !
I set the hidden input as you adviced it, just before the upload button input :
<input type="hidden" name="MAX_FILE_SIZE" value="2097152" />
<input class="upload-element" id="upload" type="file" name="upload" />
in order to escape the uploading time before an error. But it doesn’t make any difference unfortunately :/ The file will take the time (which can be quite long) to be loaded before any error mistake is showed. In the case of that site (Super Meat Boy Machine), let say I try to upload a 4 Mo file : even if the limit is set to 2, the visitor will still need to wait for the 4 megas to be loaded. And the hidden input doesn’t make any difference.Respectfully,
François NisseJune 3, 2013 at 9:37 am #4656AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.