Motorola 1 manual Input Element Type Digits

Page 26

VoxML 1.0 Element Reference

INPUT Element : Type DIGITS

INPUT Element : Type DIGITS

The DIGITS input is used to collect a series of digits from the user.

Syntax

<INPUT TYPE="DIGITS" NAME="value" NEXT="value"

[NEXTMETHOD="value"] [TIMEOUT="value"] [MIN="value"] [MAX="value"] />

Attributes

Attribute Name

Allowed Values

 

 

NAME

identifier

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

 

 

TIMEOUT

milliseconds (integer)

 

 

MIN

minimum number of digits (integer)

 

 

MAX

maximum number of digits (integer)

Examples

1 <STEP NAME="init">

2<PROMPT> Please say your pin now. </PROMPT>

3<INPUT TYPE="digits" NAME="pin" NEXT="#doit"/>

4</STEP>

The code on line 3 illustrates the use of the DIGITS INPUT to collect digits from the user, store the number in the VoxML variable named “pin”, and then go to the STEP named “doit”.

If the user were to say, “four five six”, in response to the PROMPT shown on line 2, the value “456” would be stored in the VoxML variable “pin”. The DIGITS input type will collect the digits 0 (i.e. zero) through 9 (i.e. nine), but not other numbers like 20 (i.e. twenty). To collect numbers like 20 (i.e. twenty) or 400 (i.e. four hundred), use the NUMBER input type.

October 1998

VoxML 1.0 Language Reference 22

Image 26
Contents VoxML Language Reference RevisionPage Contents Appendices Purpose of this Document What is VoxMLOverview Structure of a VoxML Document DIALOGs and STEPsBasic Elements Other Reference Documentation VoxML 1.0 Application Development GuideAttributes ACK ElementSyntax Examples Audio Element Break Element Cancel Element Next step URLExamples Case Element Class Element IntegerExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Input Element Type Date Data FormatInput Element Type Digits Input Element Type Grammar Input Element Type Hidden Input Element Type Money Input Element Type None Input Element Type Number Input Element Type Optionlist Input Element Type Phone Input Element Type PROFILE‡ Input Element Type Record Prompt Input Element Type Time Input Element Type Yorn Option Element VoxML 1.0 Element Reference Options Element Or Element Syntax AttributesPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Value Element PromptAppendices Appendix a VoxML 1.0 Document Type DefinitionOctober VoxML 1.0 Language Reference Appendix B Vcard Profile Names and Subtypes Vcard Profile Names and SubtypesFirst