n Select/Change.

I needed to make a custom test with multiple choice questions where every choice has a specified number connected to it (for example choice 1 has the value 4, choice 2 value 1, etc.) with the on Select/Change I add this number to a variable. so far no problem.but my problem is that if people aren't sure of themselves and keep changing the choice they made; then a certain number will keep be added to this variableI run out of options since I'm a new user (it's the first project)Does anybody have a thought how I can stop this unwanted adding of data, or am' I running against the limitation of Lectora? Thanks in advance.

Discussion (3)

One thing I can suggest is using nested buttons. We used to do something similiar to what you are describing. The way we dealt with users who changed their minds is to use two buttons for each question. When then first button is clicked it incremented the variable by the appropriate amount but it also displayed a "clicked" version of the button to show that they have selected the answer. If the user then clicked this newly displayed button it subtracted the same number from the variable that the first button added and then redisplayed the first button again. Doing this you can prevent continuously adding to the variable.Shawn

Thank you both for answering , I'm going to try them...

You could use an intermediate var to hold the answer for the appropriate button, and not use 'add' but 'set'.Commit this value to your original 'add-to' variable when the user leaves the page?This way, the user can click untill he becomes blue, but only his last answer will apply?Good luck!

Discussions have been disabled for this post