How to post the multiple and single questions in one poll with single title in node js

can u please give an example to create polls with the multiple and single questions in one poll with single title ?
When I’m creating questions its creating only with one questions and answers.

please suggest me to solve this issue

Thank you.

Hi @careerquo – thank you for inquiring about this. Can you try refactoring your schema with the “title” field and see what you get?

Thank you!
Gianni

@careerquo Also another follow up – are you seeing any errors in your linter or console on vscode?

NO, I’m not getting an error its creating with only one question to the one poll . But I need to create 1-10 multiple questions and answers to single poll using with same title . can u please suggest the schema how to present with 1-10 questions and answers to the one poll.
Thank You.

Hi @careerquo – can you please share screenshots of your full schema and the error you’re seeing? If you’re able to push your codebase up to Github, I’m happy to take a look and pull your file to take a look on my code editor and help debug.

Thank you,
Gianni

Hi @gianni.zoom ,
I could not upload the file but I copied and paste the code above can u please check and I need to create polls with multiple questions and answers in a one polls itself using with same title can you please edit the schema to sort out the issue.
I need schema to create polls questions like in the image below

Thank You.

Hey @careerquo,

Try using something like this:

{
  "title": "Meeting Usefulness",
  "questions": [
    {
      "name": "How useful was this meeting?",
      "type": "multiple",
      "answers": [
        "Extremely useful",
        "Somewhat useful",
        "Not useful at all"
      ]
    },
    {
      "name": "Would you like to user our service again?",
      "type": "single",
      "answers": [
        "yes",
        "no"
      ]
    },
    {
      "name": "rates",
      "type": "single",
      "answers": [
        "yes",
        "no"
      ]
    },
  ]
}

I hope that helps!

Thanks,
Max

1 Like

Hi @MaxM ,
Thank you so much for the solution. It helps me a lot.

Awesome! I’m glad to hear it! :smiley:

I’ll go ahead and close this topic now but feel free to open a new topic if you encounter any further issues or questions.

Max