!
How to make this text box only enter a positive integer from 0 to 100?
thanks a lot.
Page 1 / 1
Hi @Cathaya,
what about this?
Qualtrics.SurveyEngine.addOnload(function()
{
var input = jQuery("#"+this.questionId+" .InputText");
input.attr('type', 'number');
input.on('input', function() {
this.value = this.value.replace(/e/g, '');
if(Number(this.value) >100) this.value = 100});
});
I've modified the code from @TomG mentioned here.
what about this?
Qualtrics.SurveyEngine.addOnload(function()
{
var input = jQuery("#"+this.questionId+" .InputText");
input.attr('type', 'number');
input.on('input', function() {
this.value = this.value.replace(/e/g, '');
if(Number(this.value) >100) this.value = 100});
});
I've modified the code from @TomG mentioned here.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.