Yii Framework Forum: Form builder: nested forms along with normal elements - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Form builder: nested forms along with normal elements Rate Topic: -----

#1 User is offline   vassy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 14-October 09

Posted 08 February 2010 - 10:06 AM

I'm pretty sure it is possible, but for some reason it doesn't work for me.

Form config:
return array(
	'elements' => array(
		'firstName' => array('type' => 'text', 'maxlength' => 32),
		'lastName' => array('type' => 'text', 'maxlength' => 32),
		'sub' => array(
			'type' => 'form',
			'elements' => array(
				'username' => array('type' => 'text', 'maxlength' => 32),
			),
			'model' => new SignupExtForm
		)
	),
	'buttons' => array(
		'signup' => array(
			'type' => 'submit',
			'label' => 'Sign Up'
		),
	),
	'model' => new SignupForm
);


Then when I render the form I get this:
Fatal error: Method CForm::__toString() must not throw an exception in ...

Am I doing something wrong?
0

#2 User is offline   vassy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 14-October 09

Posted 08 February 2010 - 10:12 AM

please ignore.
Found a bug in SignupExtForm
:unsure:
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users