Reputation: 1689
I have a form:
class FormFood(forms.Form):
CHOICES = [ (1,'Yes'), (2, 'No')]
response = forms.ChoiceField(widget=forms.RadioSelect,
label="Would you like some pasta, bread or rice?", choices=CHOICES)
It appears like this in my browser:
I would like 'pasta', 'bread' and 'rice' to appear on different lines with bullet points like this:
Would you like:
Adding \n in the label text and skipping a line using 'enter'. Neither have worked.
Could somebody point me in the right direction as to how best to do this?
Upvotes: 1
Views: 453
Reputation: 348
Use single quotes than double quotes and write the following-
label='Would you like: <ul><li>pasta</li><li>bread</li><li>rice</li></ul>'
Upvotes: 0
Reputation: 966
Try this, with closing tag of '<ul>'
there will be a continuous spaces if you ever need to add more labels. but with close '</ul>'
tag all other label with different option will aligned.
label = 'Would you like: <ul><li>pasta</li><li>bread</li><li>rice</li></ul>'
Upvotes: 1