Use radio buttons not textboxes for multi-choice

No need to make people type when they can click, and gives us consistent
data.
This commit is contained in:
Chris Hill-Scott
2016-10-31 15:05:22 +00:00
parent 318e8fdc81
commit d832a9107c
3 changed files with 23 additions and 12 deletions

View File

@@ -350,9 +350,14 @@ class Feedback(Form):
class RequestToGoLiveForm(Form):
channel = StringField(
channel = RadioField(
'Are you sending emails or text messages or both?',
validators=[DataRequired(message='Cant be empty')]
choices=[
('emails', 'Emails'),
('text messages', 'Text messages'),
('emails and text messages', 'Both')
],
validators=[DataRequired()]
)
start_date = StringField(
'When will you be ready to start sending messages?',
@@ -366,10 +371,15 @@ class RequestToGoLiveForm(Form):
'Will the number of messages a month increase and when will that start? Give an estimate.',
validators=[DataRequired(message='Cant be empty')]
)
upload_or_api = StringField(
upload_or_api = RadioField(
'Are you uploading a list of contacts that youre sending your message to, ' +
'or are you integrating your system with ours?',
validators=[DataRequired(message='Cant be empty')]
choices=[
('File upload', 'Upload a spreadsheet of recipients'),
('API', 'Integrate with the GOV.UK Notify API'),
('API and file upload', 'Both')
],
validators=[DataRequired()]
)