Skip to main content
February 29, 2012
Question

Pass an array through from one page to the next

  • February 29, 2012
  • 1 reply
  • 788 views

I'm trying to pass an array through from one CF page to the next. I have been trying to do it as a hidden form variable using WDDX to serialise, then deserialise on the next page.

My code looks like this:

Page 1

<CFWDDX action="CFML2WDDX" input="#yourarray#" output="wddx_yourarray">

then in the form:

<input type="Hidden" name="wddx_yourarray" value="#wddx_yourarray#">


Page 2

<CFWDDX action="WDDX2CFML" input="#wddx_yourarray#"
output="yourarray">

The error I'm getting is:

WDDX packet parse error at line 1, column 519. The reference to entity "Nationality" must end with the ';' delimiter..

Anyone know what the problem is, or have a better suggestion as to how to do this?

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    February 29, 2012

    Use

    <cfoutput><input type="Hidden" name="wddx_yourarray" value="#wddx_yourarray#"></cfoutput>

    or

    <cfform>

    <cfinput type="Hidden" name="wddx_yourarray" value="#wddx_yourarray#">

    <cfform>

    Inspiring
    March 1, 2012

    Have you dumped out the WDDX on Page 1 and 2 to ensure that it is valid XML?