Element type | form |
Attributes | id | scope |
Parents | vxml |
Children | block | catch | error | field | filled | grammar | help | initial | link | noinput | nomatch | object | property | record | script | subdialog | transfer | var |
Description | A collection of form items that are to be collected through a dialog with the user according to the Form Interpretation Algorithm. |
<!ELEMENT form (%input; | %event.handler; | filled | initial | object | link | property | record | script | subdialog | transfer | %variable;)* > <!ATTLIST form id ID #IMPLIED scope %scope; 'dialog' >
id : ID
The identifier of a form. It allows the form to be a target of a goto, submit, or subdialog element.
scope : (dialog | document)
Indicates the scope of this form's grammars. It can be dialog or document which the VoiceXML interpreter will translate to local or global scope.
filled elements
These are executed once the form is filled in part or in whole depending on the filled elements' mode and namelist attributes.
form.items
These are to be visited according to the Form Interpretation Algorithm.
grammar elements
Grammars that are active during the execution of this form.
link elements
Links that are active throughout the execution of this form.
property elements
These set properties for the duration of the execution of this form.
script elements
Scripts to be executed upon entry into this form.
var elements
These declare variables that are in scope throughout the execution of this form.
<?xml version="1.0" encoding="iso-8859-1"?> <vxml version="1.0"> <form id="getssn" scope="document"> <field name="ssn" type="digits"> <prompt>Enter your nine digit social security number</prompt> <filled> <if cond="ssn.length != '9'"> <clear namelist="ssn"/> <throw event="nomatch"/> </if> </filled> </field> <filled> <goto next="#getdob"/> </filled> </form> <form id="getdob" scope="document"> <field name="dob" type="date"> <prompt>Enter your date of birth</prompt> </field> <filled> <goto next="#final"/> </filled> </form> <form id="final" scope="document"> <block> <prompt> Your social security number <value expr="ssn"/> and date of birth of <value expr="dob"/> have been entered. </prompt> </block> </form> </vxml> |
3.135.247.188