Skip to content

Commit 4fa60d0

Browse files
[Feature] Allow multiple "Insertion in the form" (dom) blocks per entity
Created a new method findContainers() (based on findContainer()) that returns all 'dom' containers for an item based on its entity (with parent entity handling via getAncestorsOf()). Adapted hooks (pre_item_add, pre_item_update, post_item_add, post_item_update) to manage multiple containers using the _plugin_fields_data_multi array. Updated the populateData() function to extract input values by stripping the prefix, ensuring that data is saved into the correct columns of the injection table. Modified the container.form.php file to "clean" the form data (by removing the prefix) before calling updateFieldsValues(), thereby enabling the saving of domtab containers. This PR provides the ability to define multiple "Insertion in the form" blocks for the same item based on its entity by leveraging the new findContainers() method and adapting the save process.
1 parent fd6c0dc commit 4fa60d0

3 files changed

Lines changed: 321 additions & 236 deletions

File tree

0 commit comments

Comments
 (0)