I use Symfony and Doctrine to generate forms for my CMSes. Lately I\'ve been customizing them by setting default values based on specific URL parameters.
For exampl
Whenever I need the context in a form, I'm doing it via constructor injection.
in the action:
$this->form = new WhateverForm($whatever, array("context" => $this->getContext()));
in the form:
$this->getOption("context");