Title: Display Response Array from the debug email?
Last modified: August 30, 2016

---

# Display Response Array from the debug email?

 *  [BigRJD](https://wordpress.org/support/users/bigrjd/)
 * (@bigrjd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/display-response-array-from-the-debug-email/)
 * I am successfully submitting my data and recieving the debug email with the response
   from the 3rd party server.
 * However I am having trouble accessing the [body] in the *** Response *** array
   as their is data in there that I need to use and I can’t figure out how to display
   it.
 * [https://wordpress.org/plugins/forms-3rdparty-integration/](https://wordpress.org/plugins/forms-3rdparty-integration/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [BigRJD](https://wordpress.org/support/users/bigrjd/)
 * (@bigrjd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/display-response-array-from-the-debug-email/#post-6649988)
 * I have figured it out, I am using the below code.
 *     ```
       class MyPlugin {
           public function MyPlugin() {
               add_filter('Forms3rdPartyIntegration_service', array(&$this, 'adjust_response'), 10, 2);
           }
   
           public function adjust_response($body, $refs) {
               // use 'attach' to inject to regular email
               // use 'message' to inject to page
               //$refs['attach'] = 'custom message in email';
               $refs['message'] = $body; // <---- this
           }
       }
       new MyPlugin(); // attach hook
       ```
   
 * It would be nice however to be able to create a URL redirect at this point and
   including in that the paramaters of $body.
 * Any suggestion on how to proceed?
 *  Plugin Author [zaus](https://wordpress.org/support/users/zaus/)
 * (@zaus)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/display-response-array-from-the-debug-email/#post-6650127)
 * It depends on which form plugin you’re using. I’ve done something with CF7 for
   a client, but it involved saving the URL returned in the `$body` to a class variable
   and then using that in another hook on `Forms3rdPartyIntegration_remote_success`
   to inject it into CF7’s ‘additional_settings’ as a javascript redirect, something
   like:
 *  private function attach($cf7) {
    $addl = $cf7->prop(‘additional_settings’); 
   $addl .= “\non_sent_ok: \”location = ‘{$this->url}’\””;
 *  $cf7->set_properties(array(‘additional_settings’=>$addl));
    }
 * I haven’t tried it, but you might be able to just insert a javascript redirect
   directly into `$body` like `$body .= "<script>location = $url</script>"`.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Display Response Array from the debug email?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/forms-3rdparty-integration.svg)
 * [Forms: 3rd-Party Integration](https://wordpress.org/plugins/forms-3rdparty-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forms-3rdparty-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forms-3rdparty-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/forms-3rdparty-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forms-3rdparty-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forms-3rdparty-integration/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [response](https://wordpress.org/support/topic-tag/response/)

 * 2 replies
 * 2 participants
 * Last reply from: [zaus](https://wordpress.org/support/users/zaus/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/display-response-array-from-the-debug-email/#post-6650127)
 * Status: not resolved