F
Filament17mo ago
josef

Open a modal from checkbox label

Hey y'all, I'm trying to open a modal from a Checkbox label to show terms and conditions. Do achieve that I inserted a modal component into the template for every agreement, that do show up in the rendered page with the correct id. Then I use a HtmlString for the label to dispatch the open-modal event with the agreement's id. Button looks ok in the code:
$label = new HtmlString("<button type='button' x-on:click=\"\$dispatch('open-modal', { id: '{$id}' })\">{$agreement['title']}</button>");
$label = new HtmlString("<button type='button' x-on:click=\"\$dispatch('open-modal', { id: '{$id}' })\">{$agreement['title']}</button>");
Unfortunately, when I click the label/button, nothing happens, event though the id is present and it looks alright to me. Any ideas?
1 Reply
josef
josefOP17mo ago
The rendered checkbox label
Want results from more Discord servers?
Add your server