Get Relation Fieldset State / Set Outside State in Relationship Fieldset
Form resources that have fieldset relationship, how to get state that fieldset on outside?
just for example :
or set outside state in relationship fieldset
18 Replies
can you explain what you are trying to do with the FieldSet and the relationship? Are you trying to create a Select with the users?
Nah.
I have one to one relationship, I want edit in one form. Lets say table
users
have name
column and the nurses
table have slug
column.
Like in example (https://filamentphp.com/docs/3.x/forms/advanced#generating-a-slug-from-a-title), when edit name, will automatically update slug value.check out the example again...
you are using callable which is an old syntax for Filament v2
Isn't "callable" just for ide helper?
nope
from example
Tried, nothing happens.
and if you use the example provided in your code... comment the rest
live()
and reactive()
are the same. use one which should be live()
Forgot to delete, thanks for reminding.
Solution
you should use
this is because of the relationship user
you have to go one level up to target the slug input
Thats what i think 👌
It will work for sure 😉
Yes, it is.
Thanks for your help! Turns out it's like a folder path, i just realised that too.