Hello.
I am using freeform to create a survey. I have a file upload field and captchas to avoid spam. I am still working on a Test server.
My problem is that the form is not refreshing the captchas images after clicking the “return to previous page” from the error page.
If an user try to upload a file that is not supported, and all the fileds, including captcha is filled properly, the user gets the error page saying that the filetype is not supported. Now, if the user clicks on the “return to previous page” link, the captcha image doesn’t refresh and the field for the captcha keeps the same value as well.
Interesting enough, the field for the file upload gets cleared. Now if the user tries to upload a supported file, he/she will get an error saying that the word entered doesn’t match with the one displayed in the image.
Any idea why is this happening? I have been looking for similar cases, but I haven’t found a solution yet. I found this post in solspace forums: http://www.solspace.com/forums/viewthread/108/ But it is not solved.
My form is here: http://131.94.117.219/sunguide/index.php?/contact/general
Any help will be greatly appreciate it.
Thanks. Atiosis
Moved to Modules: Discussion and Questions
atiosis,
something odd is happening on your template. /contact/general is being rendered above the header of the page.
In your form code this is displaying
<form id='freeform' method="post" action="http://131.94.117.219/sunguide/index.php?" enctype="multipart/form-data" >
I believe it should look like this
<form id='freeform' method="post" action="http://131.94.117.219/sunguide/index.php?/contact/general" enctype="multipart/form-data" >
I would try creating a separate testing template and reduce your form and tags to a bare minimum unitl you find the culprit, but I think there may be a syntax problem there.
<form id='freeform' method="post" action="http://131.94.117.219/sunguide/index.php?" enctype="multipart/form-data" >
Do you think this is what is not allowing the captchas to refresh? I have no idea on how to fix that. :(
I did try simplifying the template and testing, and still getting the same results.
As John said, if you view the source of the page, you see:
/contact/general
<!-- CONTACT - GENERAL -->
And as a general rule, we shouldn’t have anything above the DocType. Can you try to isolate where that is coming from?
Also, as a quick test, please make a totally bare-blank template and paste only the freeform form tag in it. Test it to see if we receive the same problems and hit us with a link to that page.
-greg
Hello. Thanks a lot for looking into this. I created a new template, here is the link: http://131.94.117.219/sunguide/index.php?/contact/test/
The path that appears on the top is out of my control. The person that set up the server and the engine added for I don’t know what purpose. I just requested him to remove it, but that will be tomorrow.
The code used for the template is as follows:
Again thanks a lot. I hope you guys can help me get this going!
Atiosis
Hello. here is the new form, just the freeform code: http://131.94.117.219/sunguide/index.php?/contact/test/ Below is the form’s code.
{exp:freeform:form form_name="Contact Home" return="contact/thanks" notify="[email protected]" template="contact_home" required="name" file_upload ="Contact" send_attachment="yes"}
<table cellpadding="0" cellspacing="0">
<tr>
<td><span class="red">*</span>Name:</td><td class="form_row_field"><input type="text" name="name" value="" /></td>
</tr>
<!-- begin test upload file -->
<tr>
<td colspan="2">
<input type="file" name="file1" /><br>
(<span class="red">The size of file upload should not exceed 20 MB.</span>)
<h4><strong>Supported file formats:</strong>
.pdf, .swf, .bmp, .gif, .jpeg, .jpg, .jpe, .png, .txt, .html, .doc, .docx, .xl, .xls, .mov, .mpg, .mpeg, .mp3</h4>
</td>
</tr>
<!-- end test updload file -->
{if captcha}
<tr>
<td valign="top">Enter this value:</td><td>{captcha}</td>
</tr>
<tr>
<td valign="top">*Here:</td><td><input class="captcha" type="text" name="captcha" value=""/></td>
</tr>
{/if}
<tr>
<td valign="top"> </td><td><h4>*Indicates Required Fields</h4></td>
</tr>
<tr>
<td valign="top"> </td>
<td>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset"/>
</td>
</tr>
</table>
{/exp:freeform:form}
Again.. THANKS A LOT!
Hi Sue, try uploading an unsupported format. When you get the error, click the return to previous page link and try re-submitting a supported file format, that’s when you get the error. If I submit a supported file format, the form works just fine, the problems shows when I get an error and have to come back.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.