$ajax->submit() will create a submit button.
However, it will not end your form.
You need to also end your form with $form->end().
$ajax->submit() will work, as indicated previously:
>> $ajax->form();
>> $form->inputs();
>> $ajax->submit();
>> $form->end();
Cheers,
Graham
On Tue, 27 Jan 2009 06:21:45 -0800 (PST), Pyrite <[email protected]>
wrote:
> I can't get $ajax->submit() to work, only $form->end('Submit').
>
> What's the difference between the two?
>
> On Jan 26, 7:59 am, Graham Weldon <[email protected]> wrote:
>> $ajax->submit() creates an ajax submit element.
>> $form->end('something') creates a submit button, and ends the form.
>>
>> $ajax->form() starts a form.
>> Your usage will depends very much on your implementation, and
>> requirements.
>>
>> The simple reason for there not being an $ajax->formEnd() is because its
>> super easy to do: $form->end().
>> Both output </form>.
>>
>> here are some options to illustrate usage:
>>
>> $form->create();
>> $form->inputs();
>> $form->end('submit');
>>
>> $ajax->form();
>> $form->inputs();
>> $form->end('submit');
>>
>> $ajax->form();
>> $form->inputs();
>> $ajax->submit();
>> $form->end();
>>
>> On Mon, 26 Jan 2009 05:55:02 -0800 (PST), Pyrite <[email protected]>
>> wrote:
>>
>>
>>
>> > So what is the point/usage of $ajax->submit() then if it does not
>> > actually submit the form created with $ajax->form() ?
>>
>> > On Jan 23, 8:05 am, Mono <[email protected]> wrote:
>> >> When u use the ajax->form, the only difference with a normal form is
>> >> the first line.
>>
>> >> Normal Form:
>>
>> >> $form->create (...)
>> >> $form->input (....)
>> >> $form->input (....)
>> >> $form->end ('Send')
>>
>> >> Ajax Form:
>>
>> >> $ajax->form (...)
>> >> $form->input (....)
>> >> $form->input (....)
>> >> $form->end ('Send')
>>
>> >> On 22 Jan., 22:47, Pyrite <[email protected]> wrote:
>>
>> >> > How do you put the close tag in a form created by $ajax->form() ??
>> >> > Why
>> >> > is there not an $ajax->formEnd() similar to the FormHelper's
>> $form->end
>> >> > () ?
>>
>> >> > Also, when I create a form with $ajax->form(), and I add a submit
>> >> > with
>> >> > $ajax->submit(), it does not submit the form. A usage example would
>> >> > be
>> >> > great. I can only get it to submit the form if I use $form->end
>> >> > ('Submit') instead of $ajax->submit().- Hide quoted text -
>>
>> >> - Show quoted text -- Hide quoted text -
>>
>> - Show quoted text -
>
--
Cheers,
Graham Weldon
w. http://grahamweldon.com
e. [email protected]
p. +61 407 017 293
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---