Created
February 4, 2010 15:19
-
-
Save treffynnon/294742 to your computer and use it in GitHub Desktop.
Agavi: Form pre-population
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment