Skip to content
Discussion options

You must be logged in to vote

Hi @axifra, yes you can do with a minor modification to the plugin file. You need to change the maxlength attribute in the <input type="text"> tag. You may also want to change the minlength attribute to be the same number, if the code should always have exactly 9 digits (see the docs about the input type="text" tag for all of the options). This is the relevant line in the survey-text plugin. You could add the maxlength attribute anywhere in the input tag, like this:

html += '<input type="text" maxlength="9" id="input-'+question_index+'"  name="#jspsych-survey-text-response-' + question_index + '" data-name="'+question.name+'" size="'+question.columns+'" '+autofocus+' '+req+' placeholder="'+

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@axifra
Comment options

Answer selected by axifra
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