ok, so after a bit of testing and reading up I found out validanguage has a manual function to check the form: validateForm(). I figured I could throw that in a callback of the ajax call, before it submits the form.
BUT, Firebug throws an error when I try to call that particular function validanguage.validateForm('form1'): validanguage[ajaxLocation][form][type] is undefined http://ijskarverhuur/js/validanguage/validanguage_uncompressed.js Line 2531 Anyone who knows what could be wrong?? Cheers Robin On Sep 16, 8:52 pm, watchout <w4tch...@gmail.com> wrote: > Hi, I am fairly new to CakePHP, though have been impressed with its > capabilities. > > My problem is as follows: > > I am creating an ajax form using the $ajax->form() method. This all > works nice and well. Now I am using the validanguage helper to do some > client-side validating. The helper works (I get an error message when > I press the submit button), BUT the form still does the ajax call. > This obviously shouldn't happen if the form doesn't validate. > > I suppose the ajax call is being submitted anyway because the $ajax->form() > method uses its own little piece of js to submit the form and > > thereby doesn't care about validanguage not validating the form. > > Anyone any clue how I can fix this problem? > > Thanks! > > Robin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---