Skip to content

Commit 9f4371a

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 87d0684 commit 9f4371a

3 files changed

Lines changed: 300 additions & 222 deletions

File tree

0 commit comments

Comments
 (0)