How do I return prompt choices?
Posted: Thu Dec 13, 2012 3:11 pm
When a prompt choice is returned do I have to submit that choice, and if so, how do I get the message_reference so I save the data to the correct record?
Welcome to the PlumVoice IVR Support Forum
https://support.plumvoice.com/
Code: Select all
<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>";
?>
<vxml version="2.0">
<var name="message_reference" expr="'<?= $_POST['message_reference'] ?>'"/>
<form>
<field name="choice" type="digits">
<prompt> Enter a number. </prompt>
<filled>
<submit next="save_choice.php" namelist="choice message_reference" method="post"/>
</filled>
</field>
</form>
</vxml>
Code: Select all
<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>";
//Save the file here
//reference $_POST['choice'] and $_POST['message_reference']
?>
<vxml version="2.0">
<form>
<block>
<prompt> Thank you. Your choice has been saved. </prompt>
<disconnect/>
</block>
</form>
</vxml>