Hi @patoel,
We have worked on a custom code that should help with a similar solution that we have provided.
<?php
add_filter( 'forminator_prepared_data', 'wpmudev_merge_text_field_val', 10, 2 );
function wpmudev_merge_text_field_val( $prepared_data, $module_object ){
if ( $module_object->id != 350 ) { //Please change the form ID
return $prepared_data;
}
if ( ! empty( $prepared_data['text-2'] ) && ! empty( $prepared_data['text-1'] ) ) {
$prepared_data['text-1'] = $prepared_data['text-1'] . $prepared_data['text-2'];
}
return $prepared_data;
}
The code mentioned above will merge the value from “text-2” with “text-1” before saving the submission into the database. To implement this, you will need to replace the form ID “350” in the given code with the ID of your specific form. The code could be added using a mu-plugin, I hope the following guide comes in handy: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
I hope that helps. Please feel free to get back to us if you need any further clarification.
Kind Regards,
Nebu John