Add spaces to CF7 field names
-
hello,i have this code to replace “_” with “” in field names, but not work
function filter_add_spaces_to_field_names($formData) { foreach ($formData->posted_data as $key => $value) { $key2 = str_replace('_', ' ', $key); if ($key != $key2) { unset($formData->posted_data[$key]); $formData->posted_data[$key2] = $value; } } return $formData; } add_filter('cfdb_form_data', 'filter_add_spaces_to_field_names');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add spaces to CF7 field names’ is closed to new replies.