developer_guide:voicexml_references:elements:clear

< clear >

The < clear > element resets one or more form items and will perform the following actions: * Sets the form item variable to ECMAScript undefined. * Reinitializes the prompt and event counters for the form item.

<clear
namelist="item1 item2 item3 ..."/>
namelistThe namelist attribute defines the names of the form items to be cleared. When not specified, all of the form items in the current form are cleared. This attribute is optional.
<block>, <catch>, <error>, <filled>, <help>, <if>, <noinput>, <nomatch>
None.
None.
None.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <form>
  <field name="password">
   <prompt> what is the code word </prompt>
   <help> It is the name of a fruit </help>
   <noinput> I did not hear you. </noinput>
   <nomatch count="1"> Noop. Try again </nomatch>
   <nomatch count="2"> Noop. give another try </nomatch>
   <nomatch count="3">
    Sorry. You didn't get it for three times. Bye
    <disconnect/>
   </nomatch>
   <filled>
    <if cond="password=='reset'">
     <clear namelist="password"/>
    <else/>
     This is correct.
    </if>
   </filled>
  </field>
 </form>
</vxml>
  • developer_guide/voicexml_references/elements/clear.txt
  • Last modified: 2015/10/13 21:42
  • by borja