Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Can I use token attributes as default answers to questions? - by: ricardo

$
0
0
Hello,

I have a multiple short text question. I'd like to prepopulate some of the fields with data from the token list. I have tried this but have not been able to make it work.

This is the script I'm using

<script type="text/javascript" charset="utf-8">

$(document).ready(function(){

var qID = 8568SQ001;

if($('#question'+qID+' input.text').val() == '') {

$('#question'+qID+' input.text').val('{TOKEN:ATTRIBUTE_1}');
}

});

</script>

8568 is the question ID and SQ001 is the code for the first option in the multiple short text question. Is it possible to make this work on this type of question?

thanks

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>