oTree Forum >

Add error messages while keeping the calculation result in the Input calculation snippet

#1 by Susan

Hi Chris and all,

In the input_calculation snippet (https://otree-snippets.herokuapp.com/SessionStartLinks/8c2jioic), I would like to make the numYears no more than 1/10 of the amount, so I added an error message. However, I found that the potential result will disappear if there is an error (for instance, if amount==100 and numYears=100). How can I keep the potential result on display even if there is an error?

Thanks in advance!

#2 by Chris_oTree

Try using your browser's JavaScript console to see if there are errors.

Write a reply

Set forum username