Skip to content
Discussion options

You must be logged in to vote

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:

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>'
};

Replies: 1 comment

Comment options

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