Hi
What is the maxlength for <field> attribute type=number?
Here's the behavior we are experiencing :
I've following field tag :
<field name="siteid" type="number">
If userinput length is 6 or less everything is fine.
Ex.: 999999
In case the userinput length exceeds 6 nomatch event gets triggered, Is this the expected behavior?
Moreover I would like to use type=number.
Please advice.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
What is the maxlength for <field> attribute type=numbe
IVR code for collection of fixed length set of digits
Hello,
Most builtin IVR grammars support arguments, in the case of numbers you can set the follow:
These would be used as follows:
The parameters should be adjusted to suit your needs. However, given your example of 6 digits it is unclear what you are trying to accomplish. For collecting general input from user (such as a User ID or PIN code) you should be using the builtin IVR grammar "digits". The number grammar is designed for collecting floating point numbers such as 123.4 etc. The recommendation VoiceXML for collecting a fixed legth set of digits is as follows:
Hope This Helps!
Plum Support
Most builtin IVR grammars support arguments, in the case of numbers you can set the follow:
Code: Select all
Parameter Description
minallowed Minimum number (default 0)
maxallowed Maximum number (default 999,999).
maxdecimal Maximum number of decimal places (default 2, maximum 9)
minexpected Minimum likely number (default 0)
maxexpected Maximum likely number (default 999)
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="siteid" type="number?maxallowed=999999999;maxdecimal=4">
<prompt>Please enter your site I D</prompt>
<filled>You entered <value expr="siteid"/></filled>
</field>
</form>
</vxml>
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="siteid" type="digits?length=8">
<prompt>Please enter your site I D</prompt>
<filled>You entered <value expr="siteid"/></filled>
</field>
</form>
</vxml>
Plum Support