WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Markus Amalthea Magnuson
    Member
    Posted 1 year ago #

    Hello,

    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() )
    To:
    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?

    http://wordpress.org/extend/plugins/contact-form-7-modules/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

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

Tags

No tags yet.