<clear>

Resets one or more variables, including form items.

Syntax

<clear 
    namelist = "form_item_name_1 form_item_name_2 form_item_name_3 ..."
/>

Attributes

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.

Details

Resetting a variable does both of the following:

Parents

<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>

Children

None.

Example

<?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>

See Also

<form>