Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
laabir opened this issue Dec 14, 2024 · 0 comments
Open

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

laabir opened this issue Dec 14, 2024 · 0 comments

Comments

@laabir
Copy link

laabir commented Dec 14, 2024

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]),
];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant