Input Box Problem with Zeros

akrayenhagen9721
akrayenhagen9721 Community Member Posts: 23
I have a question for everyone. I am using an input box for inserting the answer. However, the answer is 006. This causes an issue for me as I am not able to correctly check that the answer is typed in EXACTLY like that, because Lectora automatically dismisses the first two zeros. Does anyone have any answers to this issue?

Comments

  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Simplest solution... make 3 inputboxes... where the user needs to input zero-zero-six ;-)
    Offcourse with Javascript you can make a real input box of it.
  • timk
    timk Community Member Posts: 1,176 ☆ Superstar ☆
    Which version do you use?

    I tested with a "Fill in the blank" question and a simple input field. Both can be checked for 006 without issues in 17.1.3
  • akrayenhagen9721
    akrayenhagen9721 Community Member Posts: 23
    The input is not the issue. It's the return that the input provides that becomes a problem. If I put 006 in the entry field it only reads 6. Please download the attachment and use it. You may have to add an output for the CLS field, so that you can see what's being put out.
  • akrayenhagen9721
    akrayenhagen9721 Community Member Posts: 23
    Unfortunately that is not a simple solution. We are recreating a known website for training purposes.
  • jasonadal
    jasonadal Community Member Posts: 439 ♪ Opening Act ♪
    Andy - Could you post the title/page as a zip? I tested in 16.2 and am able to get output that retains the exact entry with the leading zeros in both a question (entry) and a standalone entry field. One possible alternative, depending on your use case, may be to set a separate variable from the entry field, then use that variable for the return value. You could use an OnSelectChange that modifies the variable (i.e. "return") with the variable name for the entry field (i.e. Entry_0001).

    Otherwise, the zip or maybe clarification on what you mean by return could help with a solution!
  • akrayenhagen9721
    akrayenhagen9721 Community Member Posts: 23
    Thank you all. I got the answer I needed and got it to work.

     
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!