# \<elseif>

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

Used in conjunction with the `<if>` tag.

### Attributes

<table><thead><tr><th width="164.33333333333331">Name</th><th width="163">Data type<select><option value="a191d63a2054494ab4a6f4aa3ca142b0" label="String" color="blue"></option><option value="57bdb2887047441e9cfe22713909e68b" label="Integer" color="blue"></option><option value="0ab4f09495f14d4cabccaed6df64d49b" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>cond</td><td><span data-option="a191d63a2054494ab4a6f4aa3ca142b0">String</span></td><td>An ECMAScript expression to evaluate.</td></tr></tbody></table>

### Notes

None

### Example

```markup
<?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>
          <!-- Please note that the "elseif" tag is a closed -->
          <!-- single tag. -->
        <elseif cond="myprompt==4 || myprompt==6"/>
          <prompt>
            You're close. Try again.
          </prompt>
          <clear namelist="myprompt"/>
        <else/>
          <prompt>
            Try again.
          </prompt>
          <clear namelist="myprompt"/>
        </if>
      </filled>
    </field>
  </form>
</vxml>
```

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plumvoice.com/dev/voicexml/tags/elseif-tag.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
