This is what I have at the moment:
views.py
def activation_signupcount(request):
if 'datestart' not in request.GET:
form = SegmentForm(request.GET)
#form2 = Period(request.GET)
return render_to_response('activation/activation_signupcount.html', {'datestart':'', 'form':form})
template
<form method="get" action="">
<h3>1. Choose segment</h3>
{{ form.as_p }}
forms.py
from django import forms
from django.forms.widgets import RadioSelect
from django.forms.extras.widgets import SelectDateWidget
usersegment = [['non-paying','Non-paying'],['paying','Paying'], ['all', 'All']]
class SegmentForm(forms.Form):
radio = forms.ChoiceField(required = True, label= False, widget=RadioSelect(), choices=usersegment)
The output looks like this
Questions:
- How do I set a initial or default value?
- How do I remove the bullet points
- How do I get rid of the text 'This field is required.'
I had a good look at the documentation on djangoprojects but there doesn't seem to be anything on it unless I missed something?