Toggle buttons not working in form integrated in custom ViewRecord page

Hi, I have integrated a form in a custom ViewRecord blade template. The form is defined in the Resource as secondForm() and then integrated into the ViewRecord by defining the getForms() method in the ViewRecord class (e.g. UserResources/Pages/ViewUser.php). The form is rendered in the blade template via {{ $this->secondForm }}. This works in principle, but for every Toggle element used in the form I get the following console error: Livewire Entangle Error: Livewire property ['data.removal'] cannot be found on component: ['app.filament...view-user']. What could cause this error?
1 Reply
czehnter
czehnterOP2mo ago
The solution seems to be that all Toggle elements have to be defined in the ViewRecord class like this: public ?array $data = ['removal' => false]
Want results from more Discord servers?
Add your server