In the new action for the related object, just stick that ID into the
object or set it as default for the form.
$object = new Whatever();
$object -> setRelatedId($request -> getParameter("offer_id"));
$form = new WhateverForm($object);
//OR
$form = new WhateverForm(new Whatever());
$form -> setDefault("offer_id", $request -> getParameter("offer_id"));
Daniel
On Oct 4, 3:32 am, Christian Hoffart <[email protected]> wrote:
> Hi,
>
> if want to create new object throught propel route.
> eg: link_to("add refurbishment", '@offer_refurbishment_new')
>
> the new offer_refurbishment object has a referenced offer object
> (foreign key offer_id). in the new (edit) form there is a hidden field
> with name offer_id.
>
> how can a set this foreign key (hidden field) with correct offer_id
> throught propel route like link_to("add refurbishment",
> '@offer_refurbishment_new?offer_id='. $offer->getId())?
>
> I have to rewrite the propel route?
>
> thanks
>
> Christian
>
> PS: sorry for my bad english
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" 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/symfony-users?hl=en