Value from another field
Sorry for the very simple question. I am very new to laravel and therefore filament. Inside my form, how do I get the value from a textinput (name) into another textinput (name_copy).
6 Replies
Make the textfiled that you want to get the data from reactive and use the closure $get on the filed to want to pass the data to
https://filamentphp.com/docs/2.x/forms/advanced#dependant-fields--components you can follow this example
If you need code example check here
You don't need to make the target field reactive, just the one that you want to pull the data from
I believe that did it. Thank you so much!!
You can also create a function called updated<FieldName>($value) (for example updatedSubType) or a general updated($field,$value) to perform complex logic on bound (entangled) values of the form.