Archived from the Transloadit support forum. Originally posted on May 27, 2011; details may be outdated, see our docs for current behavior. Original thread
Hi, I can use a little help with integrating jQuery form validation with transloadit plugin. I’m trying to initiate file upload with submitHandler but unsuccessfully. Here is my validation code:
' $().ready(function() {
$("#entryForm").validate({
rules: {
first_name: "required"
},
messages: {
first_name: "Please enter your first name"
}
});
}); '
Here is the code I’m testing out. After the form is being validated it triggers form submission via ‘click’ event but the file upload fails to complete.
Thank you very much for your reply. I’m anxious to resolve this code issue so the site can go into production. I tried to implement your suggestions but doesn’t seem to make a difference. Can you take a look at my latest code (attached) to see if you have any other suggestions. The problem I’m having is that upload actually goes through but the redirect doesn’t work. Testing it without validation in place seems to work fine. Thanks!
Sorry, but it’s really difficult for me to help you this way. The code you send doesn’t seem to be doing anything, and lots of files are missing. Check the attached screenshot.
The problem I’m having is that upload actually goes through but the redirect doesn’t work. Testing it without validation in place seems to work fine. Thanks!
Can you explain this further? Maybe I can help if I understand your problem better.
I’m attaching the missing files so the code should run fine now. After file upload finishes the redirect is not working. Thanks again for helping me to figure it out.
Okay I debugged your problem and could reproduce it. Unfortunately I don’t have a solution yet and need to look further. I have an appointment now though so this needs to wait until tomorrow - sorry. : |
I think I figured it out. My image (used as a button with a ‘click’ event) had id=“submit” which was conflicting with jQuery. Once I renamed the id for the image everything seems to work fine.