Last reviewed: 3/23/2024 12:14:18 PM
<filled>
A <filled> element is an action executed when fields are filled.
Syntax
<filled mode="modetype"
namelist="var1 ..." />
Attributes
mode
A <filled> element in an input item cannot specify a mode. If a mode is specified, then an error.badfetch is thrown by the platform upon encountering the document. Default value is all.
Mode Type | Description |
---|---|
all | This action is executed when all of the mentioned input items are filled and at least one has been filled by the last user input |
any | This action is executed when any of the specified input items is filled by the last user input. |
namelist
The input items to trigger on. For a <filled> in a form, namelist defaults to the names (explicit and implicit) of the form's input items. A <filled> element in an input item cannot specify a namelist (the namelist in this case is the input item name); if a namelist is specified, then an error.badfetch is thrown by the platform upon encountering the document. Note that control items are not permitted in this list; an error.badfetch is thrown when the document contains a <filled> element with a namelist attribute referencing a control item variable.
Children
<assign>, <audio>, <clear>, <disconnect>, <enumerate>, <exits>, <goto>, <if>, <log>, <prompt>, <reprompt>, <return>, <script>, <submit>, <throw>, and <value>. <var>.
Parents
<field>, <form>, <object>, <record>, <subdialog>, and <transfer>.
Variables
none
Example
The following example illustrates using example elements.
<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd"
version="2.0">
<meta name="author" content="VoiceXML 2.0"/>
<meta name="maintainer" content="productsupport@chant.net"/>
<form id="get_starting_and_ending_cities">
<field name="start_city">
<grammar src="http://www.grammars.example.com/voicexml/city.grxml"
type="application/srgs+xml"/>
<prompt>What is the starting city?</prompt>
</field>
<field name="end_city">
<grammar src="http://www.grammars.example.com/voicexml/city.grxml"
type="application/srgs+xml"/>
<prompt>What is the ending city?</prompt>
</field>
<filled mode="all" namelist="start_city end_city">
<if cond="start_city == end_city">
<prompt>
You can't fly from and to the same city.
</prompt>
<clear/>
</if>
</filled>
</form>
</vxml>
Version Information
Supported in: VoiceXML 1.0, VoiceXML 2.0, and VoiceXML 2.1.