I don't think you can easily do that with Expression manager but you could do it with a little script. Add this to the question source.
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Identify this question
var thisQuestion = $('#question{QID}');
// Add some classes
$('input.text', thisQuestion).addClass('active-item');
$('input.text:last', thisQuestion).removeClass('active-item').addClass('total-item');
// Disable the last input
$('.total-item', thisQuestion).prop('readonly', true);
// Listener on the inputs
$('.active-item', thisQuestion).on('keyup change paste', function() {
setTimeout(function() { // Pause required for paste
// Calculate and insert the total
var total = 0;
$('.active-item', thisQuestion).each(function(i) {
total = total + Number($(this).val());
});
$('.total-item', thisQuestion).val(total);
}, 100);
});
});
</script>
I have one more issue that according to my clients need we need a custom question type which include listbox(drop down list) followed by a text field. and many more type of question. So can you please suggest me that from where and how can we create a new question type. Please help me out its very urgent!!!
Hey Fresh Lemon..how r u?
Actually I have a question regarding lime survey. I have to edit in the Question Index section and could not find the template file regarding this, can you please tell me that which file is responsible for Question Index Section on the Survey Question Page.
Such display changes requiere a lot of development, probably out of the scope of this forum...
BTW you may need be interested in
this old post
; there is maybe some elements you can adapt .
Hey everyone..!!
I have a question which I have to implement in lime survey. Actually I have to set a Chained Dropdown Question Type in LimeSurvey. It means that If we choose the Country from the Drop Down List, then the Drop Down List of State is automatically populated with the correspondent data according to the country chosen.
I am wondering that how can we achieve this.?? Can anyone help me out as it is very important and urgent...