Support » Plugin: Drop Down Options in List Fields for Gravity Forms » Invalid arguement supplied for foreach()

  • When filling out this form, you have to select the “Drop” Order Type and submit to see this error:
    E_WARNING Invalid argument supplied for foreach() – /…/…/…/patrickforms.com/wp-content/plugins/gravity-forms-list-field-select-drop-down/gravity-forms-list-field-drop-down.php:108

    And this is the code on and around line 108 of the plugin:

    
    foreach ( $list_values as $key => $value ) { // get each row
    	$isDropDown = $field->itsg_list_field_drop_down;
    	$isDropDownEnableChoiceValue = $field->isDropDownEnableChoiceValue;
    	$choices = $field->isDropDownChoices;
    	if ( $isDropDown && $isDropDownEnableChoiceValue ) {
    		foreach ( $choices as $ch ) { // get each row
    			if ( $value == $ch['value'] ) {
    				$list_values[ $key ] = $ch['text'];
    			}
    		}
    	}
    }
    $submit_value = $list_values; // add row to submit value array
    
    
    • This topic was modified 3 years, 6 months ago by EliWbbr.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Invalid arguement supplied for foreach()’ is closed to new replies.