- Posts: 1
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
$('#question{QID} input[type="text"]').val(myCalculatedValue)
$('#question{QID}').hide();
LimeSurvey is not hiding the question but removing the question from the HTML-Code.Indispirit wrote: hidden questions but that means you can't save the answers.
{sum(q1, q2, q3, q4, q5, q6, q7, q8, q9, q10)}
<script type="text/javascript" charset="utf-8"> $(document).on('ready', function(){ // Interrupt the submit $('#limesurvey').on('submit', function(e) { // Load the hidden input var myCalculatedValue = "{sum(q1, q2, q3, q4, q5, q6, q7, q8, q9, q10)}"; $('#question{QID} input:text').val(myCalculatedValue); }); }); </script>