Bind GET params to a Form in Zend Framework

The equivalent of this for POST data is widely documented but for GET parameters you use the $request->getQuery method as below:

 

 

$request = $this->getRequest();
$form = $this->getServiceLocator()->get('FormElementManager')->get('FooForm');
$form->setData($request->getQuery());

et voila.