I know there are a million threads about this, but sifting through most of them I haven’t been able to find an answer.
This tutorial does a great job of explaining how to dynamically check checkboxes. Which is the function I’m really after here. However, the number of checkboxes are based on a db query.
I can easily generate a bunch of checkboxes based on a query using a repeat children. But that won’t allow me to use the nice feature of dynamically checking them as we can do the multi checkbox form data as explained in the tutorial .
I cheekily tried to place a repeat children inside of the form group which wasn’t allowed.
Any ideas on how to generate a bunch of checkboxes based on a DB query (as you do with a repeat children) but dynamically check them based on if the checkbox’s value exist in a table?