I am using a Django form for input. However, I would like to tweak it a bit. For example, the following Django code will translate to:
#Django code
aerial_size_dist = forms.ChoiceField(initial='Very Fine to Fine')
#Translated HTML
<tr><th><label for="id_aerial_size_dist">Aerial size dist:</label></th><td><select name="aerial_size_dist" id="id_aerial_size_dist"></select></td></tr>
My question is, how do I add a shortcut property, such as a “style”, from the work of Django? Can a widget change the label property of a Django form?
HTML Target
<tr><th><label for="id_aerial_size_dist" style="display:none;">Aerial size dist:</label></th><td><select name="aerial_size_dist" id="id_aerial_size_dist"></select></td></tr>
TH339 source
share