And code submitting the form in my first post now looks like:
echo $ajax->form('Snack', 'POST', array('update'=>array
('formDiv','centralText',
'url'=>'/updateSnack', 'before'=>'togglePreloader();',
'complete'=>'togglePreloader();'));
On 14 nov, 09:46, Bart <[EMAIL PROTECTED]> wrote:
> I guess i
I guess in the controller you can "try" to validate the formdata
first, instead of just "save". "$this->Model->try();" is a method that
does "save" without the eventual saving, but it does return a Boolean
whether the formdata is valid or not.
Depending on that result you can either render('nextPa
I'm quite interested in this as well. Can you tell us more about how
you made this work, maybe show your code?
My problem is that I "disappear" my form after data is submitted. Can
I somehow "not disappear it" when it doesn't validate?
/Anders
On Nov 11, 8:51 am, Bart <[EMAIL PROTECTED]> wrote:
I just found it.
I needed to ALSO make the AJAX call update the form.
On 10 nov, 22:17, Bart <[EMAIL PROTECTED]> wrote:
> Hello there,
>
> I have aformthat I submit with anAJAXcall. TheAJAXcall also
> updates another div in the page. I does not update theformdiv
> itself.
> All goes well, except
Hello there,
I have a form that I submit with an AJAX call. The AJAX call also
updates another div in the page. I does not update the form div
itself.
All goes well, except when the form input is validated as false there
is no error message.
The submission simply stops, the item is not inserted i