I built a custom Zend_Form “myForm” and I passed it to my view with:
$this->view->form=new myForm();
Problem: form is not submitting (page doesn’t reload/refresh).I thought something was wrong with the “form” tags,but I copyied the bottom code in another page (that is not a Zend environment) and is working.This is the source code:
<form enctype="multipart/form-data" method="post" action="">
<input type="text" name="title" id="title" value="" class="">
<textarea name="text" id="text" class=""></textarea>
<input type="text" name="allegati" id="allegati" value="" class="">
<input type="hidden" name="MAX_FILE_SIZE" value="2097152" id="MAX_FILE_SIZE">
<input type="file" name="file" id="file" class="media[]"></span>
<input type="submit" name="submit" id="submit" value="submit" class="">
</form>
SOLVED: As some of you guys suggested javascript is giving problems:
I had a js script overriding with:
$('form').submit();
Thanks
Luca
Form submitting issues are 99% related to javascript conflicts with the ‘form’ element or with a wrong defined ‘form’ tag.
Always check those above when encountering problems.
P.s. for the remaining 1% feel free to ask at Stack!
Best regards