<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<var name="phonenum"/>
<form id="collect_phone">
<field name="phone_field" type="digits?length=10">
<prompt> please enter your phone number </prompt>
<filled>
<assign name="phonenum" expr="phone_field"/>
<goto next="#collect_other"/>
</filled>
</field>
</form>
<form id="collect_other">
<!-- this link resets all the fields in the #collect_other form -->
<link dtmf="*" next="#collect_other"/>
<field name="field2" type="digits">
<prompt>Please enter your age.</prompt>
</field>
<field name="field3" type="digits">
<prompt>Please enter your favorite number.</prompt>
</field>
<field name="field4" type="digits">
<prompt>Please enter your number of pets.</prompt>
</field>
<field name="field5" type="digits">
<prompt>Please enter the number of people in your household.</prompt>
</field>
<filled>
<!-- use the global var "phone" and the local fields to submit elsewhere -->
<submit next="http://nonexistent.domain.com/process.pl" method="post" namelist="phonenum field2 field3 field4 field5"/>
</filled>
</form>
</vxml>