This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Issue with extended Form class and Doctrine getObject
Issue with extended Form class and Doctrine getObject [message #103055] Sun, 25 July 2010 17:29
omoratin  is currently offline omoratin
Messages: 144
Registered: December 2005
Senior Member
Hi

I have a custom form that extends a base Doctrine model form.
When I bind request params to the form and then try to get the object out of it using getObject(), the properties of the object are empty. What am I doing wrong?
Thanks


$this->billingAddressForm = new BillingAddressForm();
$this->billingAddressForm->bind($this->getRequestParameter('billing_address'));

class BillingAddressForm extends AddressForm
{
	public function configure()
	{
		parent::configure();
		$this->widgetSchema->setNameFormat('billing_address[%s]');		
                 unset($this['name']);
  	        $decorator = new FormDecorator($this->getWidgetSchema());
  	        $this->getWidgetSchema()->addFormFormatter('custom', $decorator);
  	        $this->getWidgetSchema()->setFormFormatterName('custom');  		
	}
}

[Updated on: Sun, 25 July 2010 17:29]

Previous Topic:Propel error 10038 Attempt to initiate a new SQL Server operation with results pending
Next Topic:Doctrine_query problem
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software