How to get user data in form in Symfony 1.2?
Posted
by James Inman
on Stack Overflow
See other posts from Stack Overflow
or by James Inman
Published on 2009-03-09T19:01:11Z
Indexed on
2010/05/27
11:51 UTC
Read the original article
Hit count: 175
I'm using Symfony 1.2 in a standard Propel form class.
public function configure()
{
$this->setWidgets(array(
'graduate_job_title' => new sfWidgetFormInput( array(), array( 'maxlength' => 80, 'size' => 30, 'value' => '' ) )
));
//etc
}
However, I want the value of this field to come from the user information, which I'd normally access using $this->getUser()->getAttribute( '...' )
. However, this doesn't seem to work in the form.
What should I be using?
© Stack Overflow or respective owner