Custom form component
Hello there,
For a field called main_subject_id, I created a custom form component and added a Livewire component. The reason is because the user should be able to collapse a tree (built on the nested-set package, see screenshot) and choose a certain value . I have the frontend working but I don't know how to write the chosen value to the DB when submitting.
If I understand correctly, I have to bind the new value to the Alpine js variable?
I have this now in my form component file:
1 Reply
My Livewire component:
So I guess I have to bind the new clicked value (in this case an id) to the state-variable, which works, but it doesnt update when submitting the form
I found it. Not sure if it's the right way, but it does work. I update the record when the state is changed in my Resource file: