Dynamically populate list - 'add row' empty

Hello,

I’ve been trying to dynamically populate a list in Gravity forms. As I just need the first field out of three populated I found this code to be working well:

add_filter( 'gform_field_value_snapshotList', 'populate_snapshotList' );
function populate_snapshotList( $value ) {
  $list_array = array(
            array(
                'Product type' => 'Pension',
                'Pension Provider' => '',
                'Plan number' => '',
            ),
  );
    return $list_array;
}

The problem is that I’d like the viewer to have an option to add a new row to the list, this row is not populated anymore. I’ve been trying to add more arrays but this on the other side displays the number of arrays which kind of defeats the purpose of adding new rows… Is there an easy way of doing this?

Thank you

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.