PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Post submission hook and the entry object

  1. kpince
    Member

    Hi;

    I'm trying to use the post submission hook to manipulate data collected by a multi page form. When I use the entry object to retrieve the data, I get all the inputs on the first page but not the ones on the second and third pages:

    $entry["0"], $entry["1"], $entry["2"] are on the first page and the input values are retrieved fine. $entry["3"], $entry["4"], $entry["5"] are on the second and final page but none are retrieved for some reason.

    I failed to locate any info on this in the docs or the forums.

    Thanks in advance for the help !

    KP

    Posted 13 years ago on Monday September 19, 2011 | Permalink
  2. If you dump the entry object using print_r($entry) or equivalent, what does the object contain?

    If you want to mail the object to yourself, rather than output it in the page, you can do this:

    [php]
    wp_mail('youremail@example.com, 'Email Subject", print_r($entry,TRUE));

    That will send the print_r to your email rather than dump it in the page. If you choose to dump it in the page, you can always surround it with comment markup so it's not displayed. In your function:

    [php]
    echo "<!-- " . print_r($entry,TRUE) . " -->";
    Posted 13 years ago on Monday September 19, 2011 | Permalink
  3. kpince
    Member

    Hi;

    Thanks for the nice reply !

    It was a stupid mistake on my part. I was assuming that the entry ID's were in succession where as they weren't as I deleted and recreated fields when building the form.

    Using print_r($entry,TRUE) showed me where the problem was.

    Thank you once more..

    Solved !

    Cheers !

    KP

    Posted 13 years ago on Monday September 19, 2011 | Permalink
  4. Outstanding. Glad you were able to resolve that.

    Posted 13 years ago on Monday September 19, 2011 | Permalink

This topic has been resolved and has been closed to new replies.