I have done something similar by combining an ajax->observeField and a
regular form. Basically this is the idea in "pseudo-code" :
<form>
<input>
<input>
<input id="watchfield">
<div id="updateform">
</div>
echo $form->submit()
</form>
$ajax->observeField('watchfield', array('update' => 'updateform',
'url' => '/tests/updateform'));
The method upateform of the controller render a view that can contain
other <input> etc .... Observe field will pass only the field
"watchfield" value, if you need more "data", I made a small helper
that observeField but send a complete form ... (easy to do based on
the ajax helper).
Hope this helps
On Aug 24, 2:58 pm, BoSc <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have one big form to create a database record. But this form
> contains a list that could need updating, this means that the user can
> also choose to add a new field to the list by using an input field.
> This input field needs ti be send to my controller using $ajax-
>
> >submit. Problems are:
>
> 1/ I cannot create a nested <form><form></form</form>
> 2/ It does not work to just add the input field ($html->input) and the
> ajax submitter ($ajax->submit), since this does not seem to send any
> POST data.
>
> When I create a serperate form outside the form, it does work! How
> should I go about this, basically the form in a form method seems
> logical, but W3C does not allow nested forms.
>
> thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---