Hi everyone,
I started with a clone of - GitHub - gravityforms/simplefeedaddon: A simple feed-based add-on - and added a basic multiple select field. This gives me a multiple select field in my feed settings, however, this field will not save multiple selections. It will only ever save a single selection regardless of how many the user selects.
It also throws an error on save:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-content/plugins/gravityforms/includes/settings/fields/class-select.php on line 263
Code for my multi select field:
array(
'label' => esc_html__( 'Multi Select', 'simplefeedaddon' ),
'type' => 'select',
'multiple' => true,
'name' => 'abc',
'choices' => [
[
'label' => 'a',
'value' => 'a'
],
[
'label' => 'b',
'value' => 'b'
],
[
'label' => 'c',
'value' => 'c'
],
]
),
No other code was changed from the simplefeedaddon repo.