Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Can't use make() to set $record on a page #14

@laabir

Description

@laabir

When adding the MultiWidget to a page, the current record is not passed automatically to the widgets. We need to use the make() method to be able to pass $record to the widgets.

So we would need a function to set the $widget attribute as follows:

public function getWidgets()
{
return [
MySubmittedComments::make(["record" = $this->record]),
MySubmittedFeedback::make(["record" = $this->record],
MySubscriptions::make(["record" = $this->record]),
];
}

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