I generated simply model with Symfony.
Job:
columns:
from_get: { type: integer, notnull: true }
type: { type: string(255) }
in JobForm.class.php:
$this->setWidget('from_get', new sfWidgetFormInputHidden());
and i have action:
http://mysite.com/job/new?get=3
How can i save id=3 to from_get automatically?
in JobForm.class.php
$this->setDefault('from_get', $this->request->getParemeter('get'));
doesnt working.
I think the best place to access the request object is your module/action.
By the way, you can pass the context to the form via constructor injection. Please read this post to see a possible implementation.