enable submit if text matches | XM Community
Skip to main content
Question

enable submit if text matches

  • August 26, 2020
  • 4 replies
  • 22 views

Forum|alt.badge.img+1

On the last page before submit I would like user to enter the password before submitting. I added a single line text box to capture the password.
Is there a way I can match this value with the password I provided to user and enable submit submit of password matches?

I tried the following code but its not working:
document.getElementById('QR~QID11').addEventListener('blur', function()
{
if (document.getElementById('QR~QID11').value == "test")
{   
this.enableNextButton();
}
else
{

this.disableNextButton();  
}},false);

4 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • August 26, 2020

Use custom validation in text entry question.


Forum|alt.badge.img+1
  • Author
  • August 26, 2020

https://www.qualtrics.com/community/discussion/comment/29562#Comment_29562how will this enable/disable submit button? Do you have an example?


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • August 26, 2020

https://www.qualtrics.com/community/discussion/comment/29564#Comment_29564Ofcourse, this will not enable or disable submit button but will not allow respondent to submit the response either.


Forum|alt.badge.img+1
  • Author
  • August 26, 2020

https://www.qualtrics.com/community/discussion/comment/29565#Comment_29565I don't thinks that's what I am looking for as user is still able to submit even after entering any text in the box