{
g_hash_table_insert (ht_attrs, "class", g_strdup_printf ("%s form-check-input", g_hash_table_lookup (ht_attrs, "class")));
- g_string_append_printf (str, "\n%s<label class=\"form-check-label\">%s</label>",
+ g_string_append_printf (str, "\n%s<label class=\"form-check-label\" for=\"%s\">%s</label>",
zak_cgi_tag_tag_ht ("input", zak_form_cgi_form_element_get_id (element), ht_attrs),
+ zak_form_cgi_form_element_get_id (element),
zak_form_cgi_form_element_check_get_text (ZAK_FORM_CGI_FORM_ELEMENT_CHECK (element)));
}
{
/* g_hash_table_insert (ht_attrs_option, "class", g_strdup_printf ("%s form-check-input", g_hash_table_lookup (ht_attrs_option, "class"))); */
- g_string_append_printf (ret, "\n%s<label class=\"form-check-label\"> %s</label>",
+ g_string_append_printf (ret, "\n%s<label class=\"form-check-label\" for=\"%s_%d\"> %s</label>",
zak_cgi_tag_tag_ht ("input",
g_strdup_printf ("%s_%d",
zak_form_cgi_form_element_get_id (element),
idx + 1),
ht_attrs_option),
+ zak_form_cgi_form_element_get_id (element),
+ idx + 1,
opt->content);
}