Fill form data from from Controller
I have this custom field that behaves just like a normal TextInput, but i've place a button near it that wen pressed send an event with the current value of the field to its controller. The controller then makes an API request to a server and gets some data back that must me inserted in the other field of the form.
The question I have is, is there any wayt to set this data without making another custom field?
This is how I send the event:
And this is how I register that event in the controller:
The question I have is, is there any wayt to set this data without making another custom field?
This is how I send the event:
wire:click="dispatchFormEvent('Component::eventName', $state)"And this is how I register that event in the controller: