Forum Discussion

ElizabethYou007's avatar
ElizabethYou007
Community Member
11 days ago

Numeric Entry Blank or 0

I've read some really old threads about this issue and wondered whether there was an update.

As part of an assessment, I've got a "calculator" on a slide with numeric entry fields. I was careful with the numeric fields so that they displayed as a blank empty field (i.e. not 0). The slide is set to reset to initial state. 

The first time learners use this slide, it all works fine. The fields are blank, they click in, enter the numbers, press = and either get the question right or wrong. Sorted.

Now, they are allowed to re-do the assessment. Upon re-visiting this slide, the numeric fields remember the numbers. I suppose users could click in the fields, press backpace to delete previous answers and carry on.  But really, they should be blank to be begin with at every attempt.

All I can do, is add triggers to reset the numeric entries to 0. But if I do that, they literally say "0" in each field. They've got to click in and delete the 0 before carrying on. There doesn't seem much point in resetting to 0. I want to reset to blank. 

Any ideas around this? 

I have included the slide in this project as well as an extra slide to go back so you can see how the slide remember the numbers. Currently, the reset to 0 triggers are hidden but you can unhide them in the baselayer of the first slide to see that version as well.

My only hope is that javascript can reset a numeric variable to blank rather than zero. But I wouldn't know about this. 

  • Nedim's avatar
    Nedim
    Community Member

    On the Question layer, create a trigger below for all numeric entries.

  • If do that then the calculator shows a 0 in each field. The user clicks into the first entry field but the cursor blinks over the 0 which looks weird until they have to delete the 0 (which isn't ideal) and then type over it. 
    I've been trying to reach a solution where the fields are blank on each return to the slide, even with Javascript, we've not been able to achieve this :(

    • Nedim's avatar
      Nedim
      Community Member

      This is what I see on my end:

      With triggers as follow:

      I've attached my version of .story file. Could you confirm if you see the same behavior?

  • Oh 

    My

    God!

    Yes that works, now I feel like a complete idiot, so I was setting them to reset to 0 at the start of the slide, which meant they'd display as 0s, but then resetting them to 0 when the timeline starts on the entry instead magically works. ???

    It would never have occurred to me to do this. I researched this FOR HOURS. 

    FOR HOURS!!!!!!!!

    Thank you. 😃

    • Nedim's avatar
      Nedim
      Community Member

      LOL! No problem, you are welcome, Elizabeth. Good luck with your project!