Closed Zetanova closed 4 years ago
https://github.com/kennym/cf7-to-api/blob/b9c4b71f753c1d982fb9485ae8789c0702177270/includes/class-cf7-api-admin.php#L358-L369
This code is assuming that all valid form fields are known at design time. the popular cf7 repeater plugin adds fields with an surfix of -1
-1
quick fix/workaround
preg_match_all("/\[(\w+(-\d+)?)\]/", $properties['json_template'], $matches, PREG_PATTERN_ORDER); $properties['wpcf7_api_data_map'] = array_merge(array_fill_keys($matches[1], ''), $properties['wpcf7_api_data_map']);
@Zetanova if you can open a PR, I will make sure we'll get that merged! :-)
https://github.com/kennym/cf7-to-api/pull/13
https://github.com/kennym/cf7-to-api/blob/b9c4b71f753c1d982fb9485ae8789c0702177270/includes/class-cf7-api-admin.php#L358-L369
This code is assuming that all valid form fields are known at design time. the popular cf7 repeater plugin adds fields with an surfix of
-1
quick fix/workaround