Hi @mano03,
Can you check if something like this would do the trick:
function wpmudev_forminator_custom_submit_msg( $response, $form_id ) {
if ( isset( $_REQUEST[ "formy_response_{$form_id}" ] ) ) {
$response['message'] = $_REQUEST[ "formy_response_{$form_id}" ];
}
return $response;
}
add_filter( 'forminator_custom_form_submit_response', 'wpmudev_forminator_custom_submit_msg', 20, 2 );
add_filter( 'forminator_custom_form_ajax_submit_response', 'wpmudev_forminator_custom_submit_msg', 20, 2 );
add_action( 'forminator_custom_form_submit_before_set_fields', function( $entry, $form_id, $field_data_array ){
// Manage entry
// If needs to update response message:
$_REQUEST[ "formy_response_{$form_id}" ] = 'The new response message';
},20 , 3 );
You would need to set new value for
$_REQUEST[ "formy_response_{$form_id}" ]
Hope this helps.
Cheers,
Predrag