vladimirn wrote:
> 
> 
> Alert you suggested me to make wont work as well :(
> phtml:
> <? $this->dojo()->javascriptCaptureStart() ?>
> function validateForm() {
>     var form = dijit.byId("signup");
>     if (!form.validate()) {
>         alert("Invalid form");
>         return false;
>     }
>     return true;
> }
> <? $this->dojo()->javascriptCaptureEnd() ?>
> <? $this->dojo()->onLoadCaptureStart() ?>
> function () {
>     dojo.connect(dijit.byId("signup"), "onSubmit", "validateForm");
> }
> <? $this->dojo()->onLoadCaptureEnd() ?>
> <div class="signupForm">
> 
> <?= $this->form ?>
> </div>
> 
> 
> Thanks,
> Vladimir
> 

Hi, there's a typo in the above, the javascript should be:


dojo.addOnLoad(function () { 
    dojo.connect(dijit.byId("clubForm"), "onSubmit", "validateForm"); 
});


function validateForm() {
    var form = dijit.byId("clubForm");
    if (form.validate()) {
        alert("Invalid form");
        return false;
    }
    return true;
} 



Is there a way to get Zend_Dojo_Form to do this for all forms automatically?
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Email-validation%2C-checkbox-and-Submit-dojo-form-question--please--tp19441003p20304122.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to