Created
February 4, 2010 15:19
-
-
Save treffynnon/294743 to your computer and use it in GitHub Desktop.
Agavi: Form pre-population by ID
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 | |
// 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' | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment