Resets one or more variables, including form items.
<clear
namelist = "form_item_name_1 form_item_name_2 form_item_name_3
..."
/>
Attribute |
Data Type |
Required? |
Default |
Description |
namelist |
list of identifiers |
no |
medium |
Space-separated list of form item variables. If not specified, all form item variables in the current form are cleared. |
Resetting a variable does both of the following:
Sets to undefined the variables specified by namelist.
Re-initializes the prompt and event counters.
<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>
None.
<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<form>
<field name="pin" type="digits?length=4">
<prompt>What is your pin number?</prompt>
<noinput>
Please say or key in your four digit pin number
<reprompt/>
</noinput>
<filled>
<if cond="pin == 1234">
Code accepted
<else/>
Invalid pin - please try again
<clear namelist="pin"/>
</if>
</filled>
</field>
</form>
</vxml>