Hi Nikita, Yes, your field definitions go into configure(). If you want to group fields, just use a Form as well - FieldGroup doesn't exist anymore.
There are two different ways to construct a form: 1) new Form(name, options) - this is for forms where you want to pass all options yourself 2) Form::create($context, name, options) - this is for forms where a set of default options is taken from the context. In your action, the context is available in the service "form.context". In configure(), you can access the context of the form via $this->getContext(). Hope it helps, Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart 2011/2/7 Nikita Korotaev <[email protected]>: > After updating to PR6, and reading a new piece of documentation about > forms: http://docs.symfony-reloaded.org/guides/forms/overview.html I've made > a separate class for my Registration form(Previously everything was in > signupController). However I'm struggling to understand the role of > configure() in the new RegistrationForm class. It seems that the declaration > of fields should go there. But how should I implement > the deprecated FieldGroup there, as I understand it should be something like > this: > $group = new Form(name, options); > // Declaration of fields > $this->add($group); > After parameters of the From constructor hava changed in PR6, I'm getting > different kind of errors. So the general question how should I create Forms > in PR6? In PR5 I was passing an object as the argument for new From($name, > $object, $validator), now this doesnt work. > And another question how should I implement the deprecated FieldGroup? > > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
