Skip to content

Update ProcessTemplate so that it automatically saves custom properties in the way ProcessField does #569

@Toutouwai

Description

@Toutouwai

If you hook into ProcessField and add a custom inputfield to the edit form, the value of that custom inputfield is automatically saved to a custom property of the Field. That is very handy and is thanks to ProcessField::saveInputfields($wrapper), which goes through all the inputfields in the wrapper and sets the values to the Field.

But ProcessTemplate doesn't follow the same approach in executeSave() and instead will only save properties with names that are predefined in the method, for example: $properties

This makes adding custom properties more difficult as you have to hook into the executeSave() method as well as the buildEditForm() method. Perhaps ProcessTemplate could be updated so that it follows the same approach as ProcessField?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions