We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

How can I have different prompts for the same field?

Answers to common Plum DEV questions

Moderators: admin, support

Locked
support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

How can I have different prompts for the same field?

Post by support »

The <prompt> tag's "count" attribute specifies how many times the user must have visited the form item containing a given prompt before it is played. E.g.

Code: Select all

<form id="form1">
  <field name="blah" type="digits">
    <prompt count="1">
      Please enter a number.
    </prompt>
    <prompt count="3">
      Using your telephone keypad, enter a number.
    </prompt>
    <filled>
      You entered <value expr="blah" />
    </filled>
    <catch event="nomatch noinput">
      <reprompt />
    </catch>
  </field>
</form>
In the above example (assuming the user provides no input or invalid input), the user will hear the following prompts in succession:

1 - Please enter a number.
2 - Please enter a number.
3 - Using your telephone keypad, enter a number.
4 or higher - Using your telephone keypad, enter a number.

Note that in the absence of a prompt whose count attribute exactly matches the number of the current iteration (in this example, 2, 4 or greater than 4), the prompt with the largest count attribute that is less than the number of the current iteration will be selected.

Locked