Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.

Conversation

@lsv
Copy link

@lsv lsv commented Dec 11, 2014

Got a few of these, so if you "forget" to add a group to a field, then you would get the notice about group is not defined.

So added isset instead

Got a few of these, so if you "forget" to add a group to a field, then you would get the notice about group is not defined.

So added isset instead
@kbond
Copy link
Owner

kbond commented Dec 11, 2014

Hmm, shouldn't every field have a group from the GroupTypeExtension? Their default value is null but they should all have the "var".

@lsv
Copy link
Author

lsv commented Dec 11, 2014

Im lazy and only set groups on not "default group" stuff.

->add('title', 'text', [
   'required' => true,
])
->add('description', 'genemu_tinymce', [
      'required' => false,
      'group' => 'Descriptions',
])

@kbond
Copy link
Owner

kbond commented Dec 11, 2014

Yeah, exactly, when you specifically set a group, it defaults to null.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ensuring that group was specifically set (is not the default value of null)

@kbond
Copy link
Owner

kbond commented Dec 11, 2014

Did you add:

zenstruck_form:
    form_types:
        group: true

to your config?

@lsv
Copy link
Author

lsv commented Dec 11, 2014

Yes, I have

zenstruck_form:
    form_types:
        ajax_entity_controller: true
        ajax_entity: true
        group: true

@kbond
Copy link
Owner

kbond commented Dec 11, 2014

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants