{% import 'macros_form.html' as form without context %} {{ form.tablefield(label=caption, checked=checked, name='%s%s' % (uid, name), id='%s%s%s' % (uid, name, subid), type='checkbox', value=value) }}