Plum DEV Documentation
voicexml:tags:clear

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

voicexml:tags:clear [2014/05/29 15:32]
jennifer meta description
voicexml:tags:clear [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹clear› VoiceXML tag details, attributes and VXML code example | The clear element resets one or more form item(s).}} 
-=====<​clear>​===== 
- 
-The <​clear>​ element resets one or more form items. 
-====Attributes==== 
-| namelist | The list of variables to be reset; this can include variable names other than form items. When not specified, all form items in the current form are cleared. | 
- 
-====Notes==== 
- 
-None 
- 
-====Example==== 
-<​code>​ 
-<?xml version="​1.0"?>​ 
-<vxml version="​2.0">​ 
-  <​form>​ 
-    <field name="​myprompt"​ type="​digits">​ 
-      <​prompt>​ 
-        Say the magic number between 1 and 9. 
-      </​prompt>​ 
-      <​filled>​ 
-        <if cond="​myprompt==5">​ 
-          <​prompt>​ 
-            You guessed correctly! 
-          </​prompt>​ 
-        <elseif cond="​myprompt==4 || myprompt==6"/>​ 
-          <​prompt>​ 
-            You're close. Try again. 
-          </​prompt>​ 
-          <!-- If we were not to clear the "​myprompt"​ --> 
-          <!-- variable, the dialog would simply --> 
-          <!-- finish. Instead, we force another --> 
-          <!-- attempt to fill the field. --> 
-          <clear namelist="​myprompt"/>​ 
-        <​else/>​ 
-          <​prompt>​ 
-            Try again. 
-          </​prompt>​ 
-          <clear namelist="​myprompt"/>​ 
-        </if> 
-      </​filled>​ 
-    </​field>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
-The output of the above script would be: 
- 
-Computer: Say the magic number between one and nine. \\ 
-Human: Three. \\ 
-Computer: Try again. Say the magic number between one and nine. \\ 
-Human: Six. \\ 
-Computer: You're close. Try again. Say the magic number between one and nine. \\ 
-Human: Five. \\ 
-Computer: You guessed correctly! 
- 
- 
-====Child Tags==== 
- 
-None 
- 
- 
-====Parent Tags==== 
- 
-[[voicexml:​tags:​block|<​block>​]],​ [[voicexml:​tags:​catch|<​catch>​]],​ [[voicexml:​tags:​error|<​error>​]],​ [[voicexml:​tags:​filled|<​filled>​]],​ [[voicexml:​tags:​foreach|<​foreach>​]],​ [[voicexml:​tags:​help|<​help>​]],​ [[voicexml:​tags:​if|<​if>​]],​ [[voicexml:​tags:​noinput|<​noinput>​]],​ [[voicexml:​tags:​nomatch|<​nomatch>​]] 
-