Diogo Pinto
How to add a CreateAction in the headerActions of resource A, to create a record in resource B?
In your other resource extract the schema to a new method like getFormSchema():
This should work. Importing the form directly passing a closure can mess up with livewire
23 replies
Autofill TextInput based on Select value in FilamentPhp
This is possible, check the following over the docs:
- Form reactivity - live() method: https://filamentphp.com/docs/3.x/forms/advanced#the-basics-of-reactivity
- Set the state of another field: https://filamentphp.com/docs/3.x/forms/advanced#injecting-a-function-to-set-the-state-of-another-field
- Getting the state of another field:
https://filamentphp.com/docs/3.x/forms/advanced#injecting-a-function-to-set-the-state-of-another-field
So, this would work like:
So when you update the select "this_will_trigger" it will find that id on YourModel and update the textinput "this_field_will_update"
5 replies