My Bad.
I used $from->submit when I should have used $form->end
ok now each form send the right data but still both of them have the
same ID.
Even if this doesn't cause any problem should they have different ID's
just so things will be clearer?
On Jun 19, 2:24 pm, Ita <[EMAIL PROTECTED]> wrote:
> To end the first form I use $ajax->submit() and then </form> since I
> noticed ajax->submit doesn't add a form end
> the second form is ended using $form->submit('XXX'); which adds a </
> form>
>
> On Jun 19, 2:21 pm, "Jonathan Langevin" <[EMAIL PROTECTED]> wrote:
>
> > Are you ending each form properly?
>
> > On 6/19/07, Ita <[EMAIL PROTECTED]> wrote:
>
> > > Actually now that I rechecked this a problem for me.
> > > It seems that submitting the second form sends the data in the first
> > > form and ignores the fields in the second form.
>
> > > Am I doing something wrong?
>
> > > On Jun 19, 2:11 pm, Ita <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > > I'm using cake 1.2.0.5146alpha.
>
> > > > When I create a form using the $from->create method The from ID I get
> > > > is always the same ID.
> > > > For my Users controller I do:
> > > > echo $form->create('User',array('action'=>'/
> > > > resetPassword','type'=>'get'));
> > > > and get the id of 'UserAddForm'.
>
> > > > I have dug in the code and notice that the id is generated by this
> > > > line:
> > > > 'id' => $model . ife($created, 'Edit', 'Add') . 'Form',
>
> > > > which means every form can have 1 of 2 id possibilities:
> > > > UserAddForm or UserEditForm
>
> > > > The problem is that when I have 2 forms in the same page they both get
> > > > the same ID.
> > > > And when I submit one form via get (in my example) I also get an empty
> > > > field from another from.
>
> > > > Bug?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---