RWListFieldCalculations
RWListFieldCalculations copied to clipboard
Value is not saved in Gravity Forms with Drop Down List Field for Gravity Forms
Form setup
Details of bug
- In conjunction with the Drop Down List Field for Gravity Forms
http://youtu.be/UfiFfd-fkMY ( very short video ).
When setting a label and value in the Drop Down List Field for Gravity Forms plugin (https://wordpress.org/plugins/gravity-forms-list-field-select-drop-down/) The calculated value is not saved.
Setup to reproduce:
Using Gravity Forms List Field Calculations Add-On
Total field ( which is a number field ) using "List (Column Sum)"
Work around which has fixed my issue
RWListFieldCalculations.php: var_dump($value) on line 147:
array (size=1)
'Items' => string '7' (length=1)
Should be:
foreach ( $list_values as $value ) {
if ( $column_count == 1 ) {
$value = is_array($value) ? current($value) : $value; //$value could be an array
$count += GFCommon::to_number( $value ); // otherwise this expression is false
} else {
$count += GFCommon::to_number( $value[ $column ] );
}
}