Relationship table on modal? or NEW action on table action page?
I managed to find out that if I create a Resource with -- generate --simple and add a RelationManager to it I will not see the Relation div.
After some struggling/searching/reading posts/searching tutorials... I recreated the Resource with --generate and registered the relation manager to it and I see the table with all functions. If I comment the the edit will move to a modal and I do not see the table anymore.
I need an option to add the RelationManager panel on the modal, or even better I want a custom action button on the view page that will open the create form and save to the relation's Model.
somethink like:
that will open a modal where I have what I configure in the relation's form.
Solution:Jump to solution
```
Action::make('adauga')
->label('Add container')
->icon('heroicon-o-folder-plus')
->form([...
13 Replies
I need an option to add the RelationManager panel on the modal,That's not possible. Currently you can't put tables inside forms.
or even better I want a custom action button on the view page that will open the create form and save to the relation's Model.Okay. Sounds like a normal action for me? Where are you stuck?
you have on the simple page below the edit/view the table with the action buttons for the relation.
I will like eigter to import the same table to the modal or just to have a button for the action to create a record for that relation
also there is a type there "I need an option to add the RelationManager panel to the modal, when I click edit/view"
I do not know how to add the action on-click to the green colored "New contracte" near blue "Edit" on the main page that will open a modal with the form that I create in the relationmanager.
Yes I know. And I just told you that it’s not possible in a View/Edit modal.
ok. please point me in the right direction on how to create the action to create a new record
I don’t understand
Please check the action docs. It’s an Action with a form and you need to save the data. Happy to help if you get stuck there.
Action included in the table docs or action on main docs?
They all follow the same concepts. If you want to use it in the table check the tables docs.
Will try and come back with my problem or with a 10Q
it work's like this
Solution
10q for support
another question should I do the validation on the action method with classic laravel syntax or should I do the filament validation?