Contact Form 7 Modules
Undefined index after posting when JavaScript is disabled (1 post)

  1. Markus Amalthea Magnuson
    Posted 2 years ago #


    I was testing my form with JavaScript disabled, and got a PHP error saying "Undefined index" for my hidden field, using this plugin. The error came from this line, and looking at the $_POST array at that point, it only had the initial four WPCF7 fields.

    I fixed the error by changing the if condition from:
    if ( wpcf7_is_posted() )
    if ( wpcf7_is_posted() && isset( $_POST[$name] ) )

    This is the check that the Contact Form 7 plugin does for text fields, see this line.

    Might this be a fix that should be included in the next version of your plugin, or was something else broken on my side to begin with?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7 Modules
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Markus Amalthea Magnuson
  • This topic is not resolved
  • WordPress version: 3.5.1


No tags yet.