| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<field> element. These grammars will accept either voice or DTMF input from the user. Note that you will not need to further specify an external or inline grammar when using the field types:...
<field name="F_1" type="digits">
...
<filled>
<prompt>
your input was <value expr="F_1"/>.
</prompt>
</filled>
</field>
...<field name="MyField" type="digits?minlength=3"><field name="MyField" type="digits?maxlength=3"><field name="MyField" type="digits?length=3"><field name="field_getdigits" type="digits?minlength=3;maxlength=9">
<?xml version="1.0"?>
<vxml version="2.1">
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM">
<meta name="author" content="Dustin Hayre"/>
<meta name="copyright" content="2008 Voxeo Corporation"/>
<form>
<field name="F_1">
<grammar src="builtin:grammar/boolean"/>
<grammar src="builtin:dtmf/boolean"/>
<prompt> Here you can say yes, no, true or false, or press 1 for true and 2 for false </prompt>
<filled>
<!-- the interpretation will always be TRUE or FALSE -->
<log expr="'**** BOOLEAN: ' + lastresult$.interpretation"/>
</filled>
</field>
<field name="F_2">
<grammar src="builtin:grammar/digits"/>
<grammar src="builtin:dtmf/digits"/>
<prompt> Here you can input up to 16 digits, either by voice or DTMF - example: one two three four </prompt>
<filled>
<log expr="'**** DIGITS: ' + lastresult$.interpretation"/>
</filled>
</field>
<field name="F_3">
<grammar src="builtin:grammar/number"/>
<grammar src="builtin:dtmf/number"/>
<prompt> Here you can input a number by voice or DTMF - examples: one hundred fifty, one thousand two hundred </prompt>
<filled>
<log expr="'**** NUMBER: ' + lastresult$.interpretation"/>
</filled>
</field>
<field name="F_4">
<grammar src="builtin:grammar/currency"/>
<grammar src="builtin:dtmf/currency"/>
<prompt> Here you can input major currency such as Dollars, Pounds or Euros - examples: fifteen dollars and fifty cents, twenty euros </prompt>
<filled>
<log expr="'**** CURRENCY: ' + lastresult$.interpretation"/>
</filled>
</field>
<field name="F_5">
<grammar src="builtin:grammar/time"/>
<grammar src="builtin:dtmf/time"/>
<prompt> Here you can enter the hour and minute by voice or DTMF - examples: half past two, twelve thirty </prompt>
<filled>
<log expr="'**** TIME: ' + lastresult$.interpretation"/>
</filled>
</field>
<field name="F_6>
<grammar src="builtin:grammar/date"/>
<grammar src="builtin:dtmf/date"/>
<prompt> Here you can enter the date by voice or DTMF - example: august 20th </prompt>
<filled>
<log expr="'**** DATE: ' + lastresult$.interpretation"/>
</filled>
</field>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
| login |
|