How to Send values from One xml form to Another
Posted: Tue Jul 06, 2010 5:33 am
Hi
I have two forms and I want to pass the clickin form customerid to the next form caretaker form.
All the forms values entered in one form should be passed to the next form, how can I achieve this.
with regards
Kishore
<form id="clockin">
<field name="customerid" type="digits">
<grammar root="ROOT" type="application/srgs+xml" mode="dtmf">
<rule id="ROOT" scope="public">
<one-of>
<item repeat="0-255">
<ruleref uri="#digit"/>
</item>
<item> "#" </item>
</one-of>
</rule>
<rule id="digit" scope="public">
<one-of>
<item> 0 </item>
<item> 1 </item>
<item> 2 </item>
<item> 3 </item>
<item> 4 </item>
<item> 5 </item>
<item> 6 </item>
<item> 7 </item>
<item> 8 </item>
<item> 9 </item>
<item> "#" </item>
</one-of>
</rule>
</grammar>
<prompt>
You have selected for Clock In.
</prompt>
<prompt>
Enter Client ID and press Hash to Submit.
</prompt>
<filled>
<if cond="customerid.indexOf('#') != -1">
<assign name="customerid" expr="customerid.toString().replace(/#/,'')"/>
<prompt>
You entered <value expr="customerid"/>. Please wait while we process your information.
</prompt>
<else/>
<prompt>
You entered <value expr="customerid"/>. You must press hash to submit your client ID.
</prompt>
<!--<clear namelist="sendid customerid clockin"/>-->
</if>
</filled>
<noinput>
Sorry, No Input received.
<reprompt/>
</noinput>
<nomatch>
Sorry, Invalid Client ID.
<reprompt/>
</nomatch>
</field>
<subdialog name="sendid" namelist="customerid" src="http://kishore.somee.com/ClientID.aspx">
<filled>
<if cond="sendid.confirmation=='verified'">
<prompt>
Your customer ID was verified.
</prompt>
<goto next="#caretaker"/>
<else/>
<prompt>
Your customer ID was not verified.
</prompt>
<clear namelist="sendid customerid clockin"/>
<goto next="#thankyou"/>
</if>
</filled>
</subdialog>
</form>
<form id="caretaker">
<field name="caretakerid" type="digits?length=11">
<grammar root="ROOT1" type="application/srgs+xml" mode="dtmf">
<rule id="ROOT1" scope="public">
<one-of>
<item repeat="0-255">
<ruleref uri="#digit1"/>
</item>
<item> "#" </item>
</one-of>
</rule>
<rule id="digit1" scope="public">
<one-of>
<item> 0 </item>
<item> 1 </item>
<item> 2 </item>
<item> 3 </item>
<item> 4 </item>
<item> 5 </item>
<item> 6 </item>
<item> 7 </item>
<item> 8 </item>
<item> 9 </item>
<item> "#" </item>
<item> "*" </item>
</one-of>
</rule>
</grammar>
<prompt>
Enter CareTaker ID and Password. Enter CareTakerID followed by Star then Password. And press Hash to Submit.
</prompt>
<filled>
<if cond="caretakerid.indexOf('#') != -1">
<if cond="caretakerid.indexOf('*') != -1">
<assign name="id_pass" expr="caretakerid.toString().split('*')"/>
<assign name="care_id" expr="id_pass[0]"/>
<assign name="care_pass" expr="id_pass[1].toString().replace(/#/,'')"/>
<prompt>
Your CareTaker ID is <value expr="care_id"/>.
Please wait while we process your information.
</prompt>
<else/>
<prompt>
You entered <value expr="caretakerid"/>. You must enter your CareTaker ID followed by star then password.
</prompt>
</if>
<else />
<prompt>
You entered <value expr="caretakerid"/>. You did not press hash, no data was sent.
</prompt>
</if>
</filled>
<noinput>
Sorry, No Input received.
<reprompt/>
</noinput>
<nomatch>
Sorry, Invalid CareTaker ID.
<reprompt/>
</nomatch>
</field>
<subdialog name="sendcaretakerid" namelist="caretakerid" method="post" src="http://kishore.somee.com/CareTakerID.aspx">
<filled>
<if cond="sendcaretakerid.confirmation=='verified'">
<prompt>
Your CareTaker ID was verified.
</prompt>
<goto next="#patient"/>
<else/>
<prompt>
Your CareTaker ID was not verified.
</prompt>
</if>
</filled>
</subdialog>
</form>
I have two forms and I want to pass the clickin form customerid to the next form caretaker form.
All the forms values entered in one form should be passed to the next form, how can I achieve this.
with regards
Kishore
<form id="clockin">
<field name="customerid" type="digits">
<grammar root="ROOT" type="application/srgs+xml" mode="dtmf">
<rule id="ROOT" scope="public">
<one-of>
<item repeat="0-255">
<ruleref uri="#digit"/>
</item>
<item> "#" </item>
</one-of>
</rule>
<rule id="digit" scope="public">
<one-of>
<item> 0 </item>
<item> 1 </item>
<item> 2 </item>
<item> 3 </item>
<item> 4 </item>
<item> 5 </item>
<item> 6 </item>
<item> 7 </item>
<item> 8 </item>
<item> 9 </item>
<item> "#" </item>
</one-of>
</rule>
</grammar>
<prompt>
You have selected for Clock In.
</prompt>
<prompt>
Enter Client ID and press Hash to Submit.
</prompt>
<filled>
<if cond="customerid.indexOf('#') != -1">
<assign name="customerid" expr="customerid.toString().replace(/#/,'')"/>
<prompt>
You entered <value expr="customerid"/>. Please wait while we process your information.
</prompt>
<else/>
<prompt>
You entered <value expr="customerid"/>. You must press hash to submit your client ID.
</prompt>
<!--<clear namelist="sendid customerid clockin"/>-->
</if>
</filled>
<noinput>
Sorry, No Input received.
<reprompt/>
</noinput>
<nomatch>
Sorry, Invalid Client ID.
<reprompt/>
</nomatch>
</field>
<subdialog name="sendid" namelist="customerid" src="http://kishore.somee.com/ClientID.aspx">
<filled>
<if cond="sendid.confirmation=='verified'">
<prompt>
Your customer ID was verified.
</prompt>
<goto next="#caretaker"/>
<else/>
<prompt>
Your customer ID was not verified.
</prompt>
<clear namelist="sendid customerid clockin"/>
<goto next="#thankyou"/>
</if>
</filled>
</subdialog>
</form>
<form id="caretaker">
<field name="caretakerid" type="digits?length=11">
<grammar root="ROOT1" type="application/srgs+xml" mode="dtmf">
<rule id="ROOT1" scope="public">
<one-of>
<item repeat="0-255">
<ruleref uri="#digit1"/>
</item>
<item> "#" </item>
</one-of>
</rule>
<rule id="digit1" scope="public">
<one-of>
<item> 0 </item>
<item> 1 </item>
<item> 2 </item>
<item> 3 </item>
<item> 4 </item>
<item> 5 </item>
<item> 6 </item>
<item> 7 </item>
<item> 8 </item>
<item> 9 </item>
<item> "#" </item>
<item> "*" </item>
</one-of>
</rule>
</grammar>
<prompt>
Enter CareTaker ID and Password. Enter CareTakerID followed by Star then Password. And press Hash to Submit.
</prompt>
<filled>
<if cond="caretakerid.indexOf('#') != -1">
<if cond="caretakerid.indexOf('*') != -1">
<assign name="id_pass" expr="caretakerid.toString().split('*')"/>
<assign name="care_id" expr="id_pass[0]"/>
<assign name="care_pass" expr="id_pass[1].toString().replace(/#/,'')"/>
<prompt>
Your CareTaker ID is <value expr="care_id"/>.
Please wait while we process your information.
</prompt>
<else/>
<prompt>
You entered <value expr="caretakerid"/>. You must enter your CareTaker ID followed by star then password.
</prompt>
</if>
<else />
<prompt>
You entered <value expr="caretakerid"/>. You did not press hash, no data was sent.
</prompt>
</if>
</filled>
<noinput>
Sorry, No Input received.
<reprompt/>
</noinput>
<nomatch>
Sorry, Invalid CareTaker ID.
<reprompt/>
</nomatch>
</field>
<subdialog name="sendcaretakerid" namelist="caretakerid" method="post" src="http://kishore.somee.com/CareTakerID.aspx">
<filled>
<if cond="sendcaretakerid.confirmation=='verified'">
<prompt>
Your CareTaker ID was verified.
</prompt>
<goto next="#patient"/>
<else/>
<prompt>
Your CareTaker ID was not verified.
</prompt>
</if>
</filled>
</subdialog>
</form>