At about the five-minute mark, the MultiCheckboxField code is discussed. The choices are a list of tuples. Each tuple has two component. You mention key and value; I usually talk about value (what is passed behind scenes) and text (what is seen by the user). In this example the two components are the same, but they could be different. (Maybe I am misunderstanding the question.)
@@thomasblum9803 No. I do know about the main input name and value. I was asking how to set additional custom html attributes like data attribute with different values for each checkbox dynamically.
How to set html attriutes to each of the checkbox choices (key and value) (different for each choice)?
At about the five-minute mark, the MultiCheckboxField code is discussed. The choices are a list of tuples. Each tuple has two component. You mention key and value; I usually talk about value (what is passed behind scenes) and text (what is seen by the user). In this example the two components are the same, but they could be different. (Maybe I am misunderstanding the question.)
@@thomasblum9803 No. I do know about the main input name and value. I was asking how to set additional custom html attributes like data attribute with different values for each checkbox dynamically.
Maybe try render_kw: I have used it to add a class attribute: render_kw={'class':'no_bullets'} I assume it can be use for other attributes.
I think I am beginning to understand the question, but I don't have an answer at this point. Sorry.
www1.lasalle.edu/~blum/c341wks/Flask_WTF_MultiCheckboxField_FiveGuys.zip