Merge 2 fields before storing to DB
-
I want to merge 2 fields (address and housenumber) before it is stored in the table.
I am using following code in my functions.php:
add_filter( ‘cfdb7_before_save_data’, function ( array $form_data ): array {$form_data[‘Adres’] = $form_data[‘Adres’] + ‘ ‘ + $form_data[‘Huisnummer’] ;
return $form_data;
} );
Fields ‘Adres’ and ‘Huisnummer’ do exist in the form and are individually stored in the CFDB table.
What I am missing, looks like the function is not fired.
Thanks and kind regards Fred Stuurman
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Merge 2 fields before storing to DB’ is closed to new replies.