diff --git a/src/components/SignupQuestionsWidget/OptionsWidget.tsx b/src/components/SignupQuestionsWidget/OptionsWidget.tsx index e90e17a..ef12d2e 100644 --- a/src/components/SignupQuestionsWidget/OptionsWidget.tsx +++ b/src/components/SignupQuestionsWidget/OptionsWidget.tsx @@ -32,7 +32,7 @@ class OptionsWidget extends React.Component { diff --git a/src/pages/SignUpPage/SignUpPage.tsx b/src/pages/SignUpPage/SignUpPage.tsx index 5c82604..e8668a8 100644 --- a/src/pages/SignUpPage/SignUpPage.tsx +++ b/src/pages/SignUpPage/SignUpPage.tsx @@ -75,6 +75,14 @@ class SignUpPage extends React.Component { uniqueItems: true, }; } + else if (question.type === "email") { + obj = { + type: "string", + title: question.name, + format: "email", + default: "" + } + } else { throw new Error(`No mapping to schema prop for question type ${question.type}`); } @@ -151,7 +159,6 @@ class SignUpPage extends React.Component { id: undefined, signupForm_id: signUpForm.id, answer: data.formData, - list_name: data.formData[signUpForm.questions[0].id] }; if (payload.id === undefined) { const resp = await createSignup(payload); @@ -204,11 +211,11 @@ class SignUpPage extends React.Component { renderList() { const { signUpForm } = this.state; return ( -
- {signUpForm.signups.map(s => ( -

{s}

+
    + {signUpForm.signups.map((s, idx) => ( +
  1. {s}
  2. ))} -
+ ) }