We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
verifying a field on a form
-
- Posts: 23
- Joined: Mon Jun 28, 2010 1:24 pm
verifying a field on a form
I was trying to verify a field all on the one form. So i wanted the user to enter/say Field1 and then i wanted to repeat the value of field1 back to the user and get them to verify by e.g. 1 to continue of * to reenter (reprompt)...So i am having trouble doing this all on the one form. So it seems i will have to do this on multiple forms but this does not seem good design. Can i do this on one form or is multiple forms my only option?
Re: verifying a field on a form
Hi Neil,
You can actually do this all in one form. The following is a short example of how you would accomplish this using only a single form:
Regards,
Plum Support
You can actually do this all in one form. The following is a short example of how you would accomplish this using only a single form:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form id="start">
<field name="myfield" type="digits?length=1">
<prompt>
Say or enter a digit.
</prompt>
<filled>
You entered <value expr="myfield"/>.
</filled>
</field>
<field name="confirm">
<grammar type="application/x-jsgf" mode="dtmf">
( 1 | 2 )+
</grammar>
<prompt>
Is this correct? Press 1 for yes or 2 for no.
</prompt>
<filled>
<if cond="confirm==1">
<prompt>
Ok. All done.
</prompt>
<else/>
<goto next="#start"/>
</if>
</filled>
</field>
</form>
</vxml>
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: verifying a field on a form
Just wanted to say thanks @support, this helped me as well. This answer came up right away on the forum search.