Forum Discussion

AnilKrishnaraj's avatar
AnilKrishnaraj
Community Member
8 months ago

Controlling the number of characters in a numeric entry field (Phone Number Capture)

Hello!

I wanted the user of my course to enter a phone number into a numeric entry field. And I was trying to control the length of the entry using the following method (which failed by the way):

Default Variable: NumericEntry (Name Changed to PhoneNumber)

Field Name: Phone Number (This has a <space>)

Default Trigger: Set PhoneNumber equal to typed value when it looses focus.

Set another T/F Variable: Phone_Change

Set Phone_Change to True, when PhoneNumber changes;

if PhoneNumber => 1000000000

and if PhoneNumber <= 9999999999

Else, show error.

No idea why this did not work.

The other option I saw, was to run several Java Scripts, which I am not good with at least as of now. Here is the link to the other discussion: Limit number of characters in a text input field using Javascript - Articulate Storyline Discussions - E-Learning Heroes

 

Any ideas?!

Cheers

Anil.

  • Forgot to mention this:

    I wanted this field to take exactly 10 digits (not more; not less either). So, I used the smallest 10-digit number and the largest 10-digit number as thresholds.