• Resolved André Kallehauge

    (@kallehauge)


    Hi,

    I can see that it have already been reported earlier but without much extra information.
    The problem is that the logic assumes that all fields have values and are numeric. This can easily be solved with one condition that checks the value before adding:

    
    for ( $row = 0; $row < $countentries; $row ++ ) {
    	$gwp_count += $entries[ $row ][ $number_field ];
    }
    
    
    for ( $row = 0; $row < $countentries; $row ++ ) {
    	if ( is_numeric( $entries[ $row ][ $number_field ] ) ) {
    		$gwp_count += $entries[ $row ][ $number_field ];
    	}
    }
    

    This can happen if the numeric field is not required and therefor have empty values or if you add a new number-field to an existing form with entries.

    / Kallehauge

  • The topic ‘Empty field values break logic’ is closed to new replies.