Title: Undefined variable response
Last modified: April 24, 2025

---

# Undefined variable response

 *  Resolved [codesmith32](https://wordpress.org/support/users/codesmith32/)
 * (@codesmith32)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-variable-response-2/)
 * The plugin appears to be broken. Getting an error in `frontend-script.js` due
   to an undeclared `response` variable in the hook attached to the `wpcf7invalid`
   event.
 * More specifically, in the unminified file,
   `wpcf7-redirect\assets\js\wpcf7r-fe.
   js` line `79`:
 * `response = event.detail.apiResponse;`
   should be`var response = event.detail.
   apiResponse;`
 * The module runs in strict mode; therefore global assignment is illegal.

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

 *  Plugin Support [rodicaelena](https://wordpress.org/support/users/rodicaelena/)
 * (@rodicaelena)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-variable-response-2/#post-18435363)
 * Hi,
 * Thank you for sharing this. We are currently working on an update.
 * Thank you for your help!
 *  Plugin Support [rodicaelena](https://wordpress.org/support/users/rodicaelena/)
 * (@rodicaelena)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-variable-response-2/#post-18441515)
 * Hi there,
 * The latest update should fix this. Can you please let us know if you are still
   experiencing issues or everything is ok?
 * Thank you!
 *  Thread Starter [codesmith32](https://wordpress.org/support/users/codesmith32/)
 * (@codesmith32)
 * [12 months ago](https://wordpress.org/support/topic/undefined-variable-response-2/#post-18507427)
 * Hey [@rodicaelena](https://wordpress.org/support/users/rodicaelena/),
 * I believe it is fixed now. I was helping a client when I discovered it, and I
   think I recall they said it was working since the update.
 * Thank you!
 *  Plugin Support [rodicaelena](https://wordpress.org/support/users/rodicaelena/)
 * (@rodicaelena)
 * [12 months ago](https://wordpress.org/support/topic/undefined-variable-response-2/#post-18507775)
 * Great, thank you for the update!

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

The topic ‘Undefined variable response’ is closed to new replies.

 * ![](https://ps.w.org/wpcf7-redirect/assets/icon-256x256.gif?rev=3416723)
 * [Redirection for Contact Form 7](https://wordpress.org/plugins/wpcf7-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpcf7-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpcf7-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/wpcf7-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpcf7-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpcf7-redirect/reviews/)

## Tags

 * ["js error"](https://wordpress.org/support/topic-tag/js-error/)
 * [Crash](https://wordpress.org/support/topic-tag/crash/)

 * 4 replies
 * 2 participants
 * Last reply from: [rodicaelena](https://wordpress.org/support/users/rodicaelena/)
 * Last activity: [12 months ago](https://wordpress.org/support/topic/undefined-variable-response-2/#post-18507775)
 * Status: resolved