@@ -185,13 +185,13 @@ export default function SurveyQuestions({
185
185
/>
186
186
)
187
187
break
188
- case SurveyQuestionType . EmailText :
188
+ case SurveyQuestionType . Email :
189
189
questionContent = (
190
190
< TextInput
191
191
defaultValue = { selectedStringValue || '' }
192
192
placeholder = "Type your email here..."
193
193
required
194
- type = ' email'
194
+ type = " email"
195
195
onChange = { ( e ) => {
196
196
const newValue = e . target . value === '' ? undefined : e . target . value
197
197
setSelectedStringValue ( newValue )
@@ -327,7 +327,7 @@ export default function SurveyQuestions({
327
327
case SurveyQuestionType . SingleChoice :
328
328
case SurveyQuestionType . ShortText :
329
329
case SurveyQuestionType . LongText :
330
- case SurveyQuestionType . EmailText :
330
+ case SurveyQuestionType . Email :
331
331
case SurveyQuestionType . Date :
332
332
payload = {
333
333
value : selectedStringValue ,
@@ -437,7 +437,11 @@ export default function SurveyQuestions({
437
437
{ currentQuestion . description && (
438
438
< p className = "caption" > { currentQuestion . description } </ p >
439
439
) }
440
- < form className = "form" > { questionContent } </ form >
440
+ < form className = "form" onSubmit = { async ( e ) => {
441
+ e . preventDefault ( )
442
+ await submitAnswer ( )
443
+ } } >
444
+ { questionContent } </ form >
441
445
< div className = "w-full flex justify-center mt-8" >
442
446
< Button
443
447
className = "next-question"
0 commit comments