Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1974

Joomla! 5.x Coding • Question about $this->ignore_fieldsets

$
0
0
In an editing form, when using $this->ignore_fieldsets, it is possible to avoid certain fieldgroups to be shown in the edit form.

This is great, however, for custom fields, if you put some fieldgroups in $this->ignore_fieldsets, and you save the item (article/contact), the values of the custom fields from the ignored fieldsets are lost upon saving.

Why?

This does not happen for standard core Joomla fields such as the Article Options:
$this->ignore_fieldsets = array_merge($this->ignore_fieldsets, ['attribs', 'basic', 'category', 'author', 'date', 'other']);

When these are ignored, which they are ignored by default, you can save the article and you won't lose the data from those options. But when you do it for a custom field group (com_fields group) it will lose data upon saving.

Is there a way to work around this issue? How can you skip certain fieldgroups from a form by using ignore_fieldsets and preserve data upon saving?

Thanks for any help!

Statistics: Posted by AndySDH — Tue Nov 19, 2024 4:00 pm



Viewing all articles
Browse latest Browse all 1974

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>