Accessing Owner form data from Relation Manager create or edit modal.

Hi yall, As the title says, is there a way to access a field data on the owner form from a relation manager create or edit modal ? I want to make some validations based on the current owner's form values wich are not yet saved to the database.
6 Replies
Stavenger
StavengerOP2y ago
That access the owner model. What I need is accessing values on inputs in the owner form. Say I changed some values on the owner form but didn't save them yet and I click create on the relation manager, now I want to get the news values of the parent form for some validation on the relation manager create dialog.
awcodes
awcodes2y ago
dd($livewire) you should be able to access the form data there.
Dan Harrin
Dan Harrin2y ago
i dont think you can access the data easily its on a different livewire component
awcodes
awcodes2y ago
The whole idea of attaching a relationship before the record is even created seems weird in general. 🤷‍♂️
Stavenger
StavengerOP2y ago
On this case is on the Edit Page, so the record is already created. But my users tend to modify values on the main form, then add details on the relation manager and then click save on the main form. So I'm looking for a way to validate the main form data during the create/edit relation manager modal. What could be a workaround ? Maybe disabling the relation manager actions if the main form is modified but not saved yet ? Is that possible ?
Want results from more Discord servers?
Add your server