You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the settings I set for a field_group in config/acf.php override the settings I have on individual FieldsBuilder instances. For example:
FieldsBuilder
$frontPage = new FieldsBuilder('front_page', ['title' => 'Custom title']);
In this case, the title will be 'Default title', where I expected it to be 'Custom title'.
When I change the order the field_group defaults are merged in Log1x\AcfComposer\Composer on line 64 from this: $this->fields = array_merge($this->fields ?? [], $this->defaults->get('field_group'));
to this: $this->fields = array_merge($this->defaults->get('field_group'), $this->fields ?? []);
the title is 'Custom title', as expected. It looks like this fixes my issue, but I'm not sure if there are any other implications?
The text was updated successfully, but these errors were encountered:
I've noticed that the settings I set for a
field_group
inconfig/acf.php
override the settings I have on individualFieldsBuilder
instances. For example:FieldsBuilder
ACF config
In this case, the title will be 'Default title', where I expected it to be 'Custom title'.
When I change the order the
field_group
defaults are merged inLog1x\AcfComposer\Composer
on line 64 from this:$this->fields = array_merge($this->fields ?? [], $this->defaults->get('field_group'));
to this:
$this->fields = array_merge($this->defaults->get('field_group'), $this->fields ?? []);
the title is 'Custom title', as expected. It looks like this fixes my issue, but I'm not sure if there are any other implications?
The text was updated successfully, but these errors were encountered: