Reputation: 480
I have a form, that I'd like to display a select list, where the user can select an item and save.
What I need to do though, is pass a value to the form:
$form = new TestForm($id)
How do I then get the value of $id
in my Testform
class?
Upvotes: 0
Views: 57
Reputation: 480
The following seemed to work:
$id = $this->getOption('id');
and
TestForm(array(),array('id'=>$id))
Upvotes: 2