> For the complete documentation index, see [llms.txt](https://docs.plumvoice.com/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plumvoice.com/dev/voicexml/tags/block-tag.md).

# \<block>

## \<block> <a href="#block" id="block"></a>

This element is a form item. It contains executable content that is executed if the block's form item variable is undefined and the block's cond attribute, if any, evaluates to true.

### Attributes

<table><thead><tr><th width="181.33333333333331">Name</th><th width="178">Data type<select><option value="7cee6064e37445f28b062b104535c52a" label="String" color="blue"></option><option value="9323dae340ad485d9e5c692cd990ecd6" label="Integer" color="blue"></option><option value="5e95a46ac16e4494b2e0f44550884ca6" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>name</td><td><span data-option="7cee6064e37445f28b062b104535c52a">String</span></td><td>The name of the form item variable used to track whether this block is eligible to be executed; defaults to an inaccessible internal variable.</td></tr><tr><td>cond</td><td><span data-option="7cee6064e37445f28b062b104535c52a">String</span></td><td>An expression that must evaluate to true after conversion to Boolean in order for the form item to be visited.</td></tr><tr><td>expr</td><td><span data-option="7cee6064e37445f28b062b104535c52a">String</span></td><td>The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the block will not be visited unless the form item variable is cleared.</td></tr></tbody></table>

### Notes

None

### Example

```markup
<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <!-- This block will be executed first. -->
    <block>
      <prompt>
        Setting block condition variables.
      </prompt>
      <assign name="blockcond1" expr="true"/>
      <assign name="blockcond2" expr="false"/>
    </block>
    <!-- This block will be executed because "blockcond1" is "true". -->
    <block name="myblock1" cond="blockcond1">
      <prompt>
        This prompt will play.
      </prompt>
    </block>
    <!-- This block will not be executed since "blockcond2" is "false". -->
    <block name="myblock2" cond="blockcond2">
      <prompt>
        This prompt will not play.
      </prompt>
    </block>
  </form>
</vxml>
```

The output of the above script would be:

> Computer: Setting block condition variables.\
> Computer: This prompt will play.

### Child Tags

[\<audio>](/dev/voicexml/tags/audio-tag.md), [\<assign>](/dev/voicexml/tags/assign-tag.md), [\<clear>](/dev/voicexml/tags/clear-tag.md), [\<data>](/dev/voicexml/tags/data-tag.md), [\<disconnect>](/dev/voicexml/tags/disconnect-tag.md), [\<enumerate>](/dev/voicexml/tags/enumerate-tag.md), [\<exit>](/dev/voicexml/tags/exit-tag.md), [\<foreach>](/dev/voicexml/tags/foreach-tag.md), [\<goto>](/dev/voicexml/tags/goto-tag.md), [\<if>](/dev/voicexml/tags/if-tag.md), [\<log>](/dev/voicexml/tags/log-tag.md), [\<prompt>](/dev/voicexml/tags/prompt-tag.md), [\<reprompt>](/dev/voicexml/tags/reprompt-tag.md), [\<return>](/dev/voicexml/tags/return-tag.md), [\<script>](/dev/voicexml/tags/script-tag.md), [\<submit>](/dev/voicexml/tags/submit-tag.md), [\<throw>](/dev/voicexml/tags/throw-tag.md), [\<value>](/dev/voicexml/tags/value-tag.md), [\<var>](/dev/voicexml/tags/var-tag.md)

### Parent Tags

[\<form>](/dev/voicexml/tags/form-tag.md)
