Page 1 of 1

How to transfer data element results via submit?

Posted: Sun Sep 30, 2007 1:39 pm
by moshe
I have gathered information via a data element, and I'd like to transfer the information gathered by that element via submit.

Code: Select all

<data src="foo.xml" name="info" method="post" namelist="request"/>
followed later by

Code: Select all

<submit expr="thatNextFile" namelist="info" method="post" />
does not work, as seen when I attempt to set info in the next script:

Code: Select all

<var name="info" expr="<?php echo $_REQUEST["info"]?>"/>
I get a null, which indicates not a PHP failure but a failure to set info in the POST in the first place. Encoding types, as well as method types, do not seem to matter.

I'm not particularly surprised that this does not work, but I'd like to know if it can be made to work. It's an implementation-dependant issue.

Transfer data element results via submit using IVR system

Posted: Mon Oct 01, 2007 10:20 am
by support
Hi,

It is not possible to submit the value of "info" in your IVR code example because it is not a simple type. The contents of "info" are a complex javascript object which has no simple representation when performing the POST.

Here is an IVR example of how you would transfer the data element results via <submit>:

Code: Select all

<data src="foo.xml" name="info"/> 
<var name="tmpvar" expr="info.documentElement.firstChild.toString()"/>
<submit next="newfile.php" namelist="tmpvar"/>
Hope this helps.

Regards,
Plum Support

Posted: Mon Oct 01, 2007 10:43 am
by moshe
Thank you. Without JSON or similar technology, I can't encapsulate the object to pass along.

Instead, I'll either re-acquire the data or put into the root's scope; actually, I've already implemented the latter.