yes this should work, The auto filling of input objects is related to
$this->data, not your models. So, as long as you set the data from
your other models with $this->data and you call it correctly in the
view you should be good.
Controller:
$this->data["Customer"]=$customer;
$this->data["Document"]=$document;
view
echo $form->input("Customer.name",....);
echo $form->input("Document.date",....);
On May 9, 1:51 pm, pamorale <[EMAIL PROTECTED]> wrote:
> Hi...
> I`d like to know if is possible to autofill some fields related to
> another models depending on the value of one field in the form.
> For instance, if the form is in a view from the Document model:
> -textfield: Document/number //not in the database
> -textfield: Document/date //the curent date
> - textfield:Customer/id //already in the database
> - textfield:Customer/name //already en the database
> - textfield:Customer/phone
> -textfield: Product/id
> -textfield: Product/name
>
> I'd like to autofill the fields name by Customer and Product by
> filling their corresponding field id. But, the view is for
> Document....
>
> Any help ??????
>
> thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---