Attaching the population filter without using form IDs (suitable where the current form is on the same page as the URL in forms action parameter)
<?php
// Like so
$this->getContext()->getRequest()->setAttribute('populate', new AgaviParameterHolder(array(
'question[0]' => 'Can you eat cheese?',
'answer[0]' => 'No'
)), 'org.agavi.filter.FormPopulationFilter');
// Or like so...
$populate =& $this->getContext()->getRequest()->getAttribute('populate', 'org.agavi.filter.FormPopulationFilter');
$populate = new AgaviParameterHolder(array(
'question[0]' => 'Can you eat cheese?',
'answer[0]' => 'No'
));
Use form ids to link the pre-population to a particular form
<?php
// With ID
$populate =& $this->getContext()->getRequest()->getAttribute('populate', 'org.agavi.filter.FormPopulationFilter');
$populate['form-id-1'] = new AgaviParameterHolder(array(
'question[0]' => 'Can you eat cheese?',
'answer[0]' => 'No'
));
$populate['form-id-2'] = new AgaviParameterHolder(array(
'question[0]' => "How many frags do I have to get before I'm considered awesome?",
'answer[0]' => 'At least 15'
));
The above hints were created with help from IRC.