-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Using event form with relations #43
Comments
with Select or Repeater. |
thanks but it's not how it works in that case, we are talking about Repeater and Select which belong to a relation and not a model. |
Hi, having this same issue and this solution doesn't seem to work: @invaders-xx did you get it working? |
@tiagof, I didn't get it working |
Have a look at #47 . You'll need to define the below methods, in your Widget class, otherwise you'll still get the exception class MyWidget extends FullCalendarWidget
{
protected function getFormModel(): Model|string|null
{
return $this->event ?? MyEventModel::class;
}
// Resolve Event record into Model property
public function resolveEventRecord(array $data): MyEventModel
{
return MyEventModel::find($data['id']);
} @saade, thoughts? |
As you reverted #47, it's not working |
// #122
|
I am not able to make it working with an event form using relations : a select or repeater.
Simple form :
I got : Call to a member function planning() on null
Event if the relation exists
The text was updated successfully, but these errors were encountered: