Skip to content
Discussion options

You must be logged in to vote

I figured out the answer: the survey-html-form code ignores anything without a name designation. I assumed it would track fields by id. Adding a name to the <select> element correctly solves the problem:

var demographic_trial = {
      type: 'survey-html-form',
      preamble: "<p>What is your gender?</p>",
      html: '<select id="gender" name="gender">'+
            '<option value="_M_">Male </option>' +
            '<option value="_F_">Female </option>' +
            '<option value="_N_">Non-Binary </option>' +
            '<option value="_O_">Prefer not to say </option>' +
            '</select><br>'

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant