I initially considered that method as a solution, but the client would prefer that the Specify response is contained in the same question, but doesn't want anyone who responds No to be able to enter anything extraneous in the text entry box (i.e., None, NA, etc.)I've found some Javascript code that works to clear the text box on advance (with a blur function that you provided to someone else) and some to make a text entry box Read Only, but I haven't been able to figure out how to apply that only if the No response has been selected. If Yes (or neither response) is selected, any entry should be allowed/retained.It seems like those solutions would be better, since the show/hide stuff didn't appear to be triggered correctly in the code rondev suggested, but I have to be able to get them into some sort of conditional statement so those actions are not carried out universally on the page, which is all I've been able to do so far.Any ideas/tips?? Thanks!
Thank you very much for your help! I can't get this code to work for me though. I do have only the one matrix question with text entry allowed for just the last statement on that page. I'm relatively certain that I have the correct ID for that element (the positive radio button for that last row of the matrix) and so I can't figure out what the problem might be. Do you suppose that a different approach might be better? The ultimate goal is to make sure that the survey user doesn't add anything in the Specify box if they have selected No (indicating that the statement doesn't apply to them.) Maybe just have the text box appear to start with and then have it be hidden only if No is selected? Would that be simpler code that would be more likely to function correctly? Or perhaps it has to do with the fact that it's all in the same question and Qualtrics doesn't really evaluate/record responses until you proceed to the next page? It seems like it may require some "in page" code, like wh
Thanks! However, I am not adept with JavaScript at all. I just found an example line of code that I could figure out how to modify to hide the text box. Unfortunately, I have no idea how to add on OnClick event or how to make the show command conditional on the fact that the YES radio is selected. I've dug around a bit, but had no luck in finding an adaptable example. I believe the ID for my YES button is #QR~QID211~7~1. Can you provide me with a code snippet that would show me how to implement a conditional OnClick event?
OK, I figured out how to get the desired effect by experimenting a bit more on my own. I used the following instead of what you suggested for the second line of code: jQuery("#"+this.questionId+" td.ControlContainer").css("padding-left", "5px"); Is that a reasonable solution, or do you think there's a better one? Thanks again for the excellent help!
Never mind, Tom. I tested things again and the reason I wasn't really seeing any difference with the padding line was because of the way the label text was wrapping. I guess what I actually need is a small bit of padding to the left of the text boxes instead...
Ah, I knew you'd have a solution, Tom - thanks! Fiddling with some of the other code snippets you've provided, I was able to get the entire question to align right (including the text boxes) but I couldn't figure out how to apply that to the labels only. One follow-up comment: your second line of code doesn't appear to have any effect on the question, because I tried to modify that to put just a small padding between the text and the response box (changed the end to 2px), but I didn't see any difference. Then I commented the second line out altogether, and it looked just the same as with it. Any tip on how to get just about a space worth of padding to the right of the labels?
Perfect! Thank you so much, Tom!!
Thanks Tom! This is exactly what I was trying to do. Just to be super picky though, is there a way to left justify the label??
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.