how to que form checklist attributes on template
Notice: This thread is very old.
- duke
- Member | 650
From documentation of forms:
You can render RadioList, Checkbox or CheckboxList by HTML elements individually. This is called partial rendering:
You can add other attributes either in this template, e.g.:
… however I suggest against using onchange
like this. Better
bind these from outside (i.e. use unobtrusive javascript).
Or you can set them from presenter:
… but setting it this way is limited if you are working with MultiChoiceControl such as CheckboxList (you can only specify the common attributes for all checkboxes this way). You can still customize them individually in template though.