Hi, when using the filter rwmb_frontend_validate
with a field which is cloneable group and noticed when i iterate over the array of values that the first array value is empty? why is this as the front end form only displays one set of fields for this group. I want to iterate over the keys and values but wondered why i have to skip the first value? is this deliberate?
field
[
'type' => 'group',
'id' => 'paypal',
'name' => 'PayPal Accounts',
'group_title' => 'PayPal',
'clone' => true,
'collapsible' => false,
'default_state' => 'expanded',
'save_state' => false,
'clone_empty_start' => true,
'add_button' => '+ Add PayPal',
'fields' => [
[
'type' => 'text',
'name' => 'Email',
'id' => 'email',
'required' => false,
'columns' => 6,
],
],
]
output in 'rwmb_frontend_validate' using error_log(print_r($_POST, true));
[19-Jan-2025 15:10:14 UTC] Array
(
[mbfs_key] => 0b93a40cc6b6156f09107c3b29bd23e9
[action] => mbfs_submit
[nonce_dcp-payment-gateways] => 56fce2e58a
[_wp_http_referer] => /dcplatform/payment-gateways/
[user_id] => 1
[data] => Array
(
[stripe] => Array
(
[live_secret_key] => ssssssssssssssss
)
[paypal] => Array
(
[0] => Array
(
[email] =>
)
[1] => Array
(
[email] => [email protected]
)
)
)
[rwmb_cleanup] => Array
(
[0] => [\"data.paypal\"]
)
[_ajax_nonce] => b7f61d3ba3
)