I am trying to create a list of items with corresponding checkboxes. The list is queried using db_multirow:
element create delete_subscription subscription_id \
-label "" -datatype text -widget checkbox -options ""
db_multirow subscriptions subscriptions { *SQL* } {
template::widget::checkbox subscription_id tag_attributes
}
Here I create the checkbox and then append options with
template::widget::checkbox subscription_id tag_attributes
.
I now have two questions.
Firstly, as you can see, I haven't specified tag_attributes
in the code snippet - simply because I am not sure how to. I've tried the standard "{{Pretty_Name name}}" used with element create -widget checkbox
, but it gives me errors. Does anyone know the right way of specifying tag_attributes?
Secondly, is there are a better way of doing this or am I on the right track?
/Simon