Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

pre-filling Constant Sum Scale question cells with ZERO

Is there a work around to pre-fill Constant Sum Scale cell with ZERO?
asked Jul 28, 2012 by anonymous
retagged Sep 13, 2012 by Walter Williams

1 Answer

+2 votes
you can use something like the following on page footer
<script type="text/javascript">
function ZeroFill()
    document.getElementById("myconst_1").value = 0;
    document.getElementById("myconst_2").value = 0;
window.addEvent('domready', ZeroFill);

the myconst_xx depends on your question name
answered Jul 28, 2012 by Bahadir Ozkurt Gold (17,010 points)
Bahadir, I have placed the code as you said and it throws the following erorr. Sorry, I didn't mention the version I am using. It is version 8.0.2

Error: Object doesn't support property or method 'addEvent'
instead of
window.addEvent('domready', ZeroFill);

<body onload="ZeroFill()">

in your FOOTER, not in JS snippet.
Thank You!
you're quite welcome :)