Expand my Community achievements bar.

Quiz

Avatar

Former Community Member

I'm fairly new to ES2.  I've created a quiz and need help.  I have a table in which I created:

1. Drop Down for multiple choice response

2. Text for the Question

3. Numeric field placing a "1" for the right selection

There are 100 questions total and at the end I want to creat a Hidden Total for the grade.  How can I set up scripting to do this?

Thank you.

JB7777

1 Reply

Avatar

Level 4

I would set up a hidden column for each question whose value = 1 if the correct answer is selected:

if (question1.rawValue == 1)

then $.rawValue = 1

endif

I would then put at the bottom a hidden field for the score, and a password field that, when exited with the correct password, reveals the hidden score and calculates it:

if ($.rawValue == "password")

then

finalScore.presence = "visible"

else

finalScore.presence = "invisible"

endif

finalScore.rawValue = sum(test.Table.Row[*].hiddenField)

Here is an example: https://acrobat.com/#d=FaXNdfzrzd-NiHc0ugEZ-w

Jo