CreateAction in RelationManager at table headerActions always use related resource form

I am struggel with tring to use fucntion form on Relation Manager class. For EditAction it works well it will always use form defined in RelationManager class, but for CreateAction it use the related Form instead. For example: course has many lessons. I make LessonsRelationManager for Course with relationship called lessons(). In the LessonsRelationshipManager I have public function form() that I defined here. But when clicking at CreateAction it jump to use form in the LessonResource class instead. How I can still use the form that is in LessionRelationManger for this action. I don't find problem in Filament 3, but problem in Filament 4.
No description
2 Replies
Zen Nitiruj
Zen NitirujOP2w ago
I just found that it is becasue I have set varaible $relatedResourece = LessonResource::class; When setting this it will go to the full page Create page from Lesson resource instead of modal form using RelationManager form. This causes another issue that CreateAction cannot pass any value to the form. I tried fillForm() function it won't work when setting $relationResource = LessonResource::class;
Wbzy
Wbzy2w ago
i also have this issue, when $relatedResourece is not setting my relation manager doesnt show. but when i setting the $relatedResourece it take the table from that related resource not the one defined in relation manager i just upgrade from v3 to v4 and this happend

Did you find this page helpful?