Hi guys,
I’ve a query wherein I’m trying to add a button which says ”Comment” so when the user clicks on it the text entry field appears to enter the comment.
Can I get some guidance how this can be achieved.
Thank You!
Hi guys,
I’ve a query wherein I’m trying to add a button which says ”Comment” so when the user clicks on it the text entry field appears to enter the comment.
Can I get some guidance how this can be achieved.
Thank You!
Hello
<button id="commentButton">Comment</button>
<div id="commentField" style="display: none;">
<textarea id="commentText" rows="4" cols="50"></textarea>
</div>
Thanks for the reply
The above image represents my actual view where in the text entry field(of Qualtrics) is only displayed when the user clicks on comment button
I’m actually trying to achieve this using Javascript .Below is initial Javascript code but for some reason this doesn’t seem to work as expected
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var questionId = 'QR~QID2';
var commentId='comment';
var inputElement = document.getElementById(questionId);
var cmnt=document.getElementById(commentId);
inputElement.hide();
$(document).ready(function(){
$(commentId).onclick(function(){
inputElement.slideToggle("fast");
});
});
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.