WordPress.org

Forums

Gravity Forms + Custom Post Types
Undefined index notices on form submission (4 posts)

  1. aljuk
    Member
    Posted 2 years ago #

    On form submission multiple notices are being generated of the following type:

    Notice: Undefined index: setParentPost in /wp-content/plugins/gravity-forms-custom-post-types/gfcptaddon_1-5.php on line 65

    http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/

  2. Joshua David Nelson
    Member
    Posted 1 year ago #

    I've had the same issue. Any luck on a fix?

  3. Joshua David Nelson
    Member
    Posted 1 year ago #

    Found the error, the fix is to add the isset( ) around the $field['setParentPost'] portion, change line 65 to this:

    if ( $field['type'] == 'select' && isset( $field['setParentPost'] ) ) {

  4. tdmoose
    Member
    Posted 1 year ago #

    Late to the party, but it seems this issue is still around. I have a slight variation on Joshua's fix. I may be overly complicating this, but it occurs to me that that value could be set but set to 0 or FALSE.

    if ( $field['type'] == 'select' && ( ! empty($field['setParentPost']) ) ) {

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms + Custom Post Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.