making survey questions mandatory #2615
-
Hi, I see that there's a way to make survey questions mandatory for the survey-text plugin with |
Beta Was this translation helpful? Give feedback.
Answered by
becky-gilbert
May 7, 2022
Replies: 1 comment
-
Hi @jshinnn, with the survey-html-form plugin you're providing all of the HTML that defines the form elements, so you can make any of them required by adding the var trial = {
type: jsPsychSurveyHtmlForm,
preamble: '<p>How are you feeling <b>right now?</b></p>',
html: '<p> I am feeling <input name="first" type="text" required />, <input name="second" type="text" required />, and <input name="third" type="text" required />.</p>'
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jshinnn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jshinnn, with the survey-html-form plugin you're providing all of the HTML that defines the form elements, so you can make any of them required by adding the
required
attribute to the input element. Here's an example: