What controller is your form calling ? Usually a form is submited, so
where do you submit it ?:
You can use any name for the 'model' i guess as long as you have
controller to handle it ..
On Nov 30, 2:14 pm, avairet <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I'm looking for a trick to use a form without a model.
> My form doesn't save POST'ed variables in a table, it just save them
> in session to simply display on another page.
>
> But when I make "$form->create(null);", all field's names contain the
> name of the current model, like "data[Model][Fieldname]" in the HTML
> form...
>
> How avoid this? I would juste have something like "data[Fieldname]"...
>
> For example (where current model is "Magazine"):
> $form->create(null);
> $form->input('Rubrique');
> $form->end('Valider');
>
> And the HTML result is:
> <form id="AddForm" method="post" action="/admin/magazines/add">
> <div class="input"><label for="MagazineRubrique">Rubrique</label>
> <input name="data[Magazine][Rubrique]" type="text" value=""
> id="MagazineRubrique" /></div>
> <div class="submit"><input type="submit" value="Valider" /></div>
> </form>
>
> And what I want ("Magazine" model never appear):
> <form id="AddForm" method="post" action="/admin/magazines/add">
> <div class="input"><label for="Rubrique">Rubrique</label>
> <input name="data[Rubrique]" type="text" value="" id="Rubrique" /></
> div>
> <div class="submit"><input type="submit" value="Valider" /></div>
> </form>
>
> Thank's in advance and excuse me for my simple frenchy English!
>
> Avairet
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---