[ad_1]
Not sure why itβs happening but resolved it with preg_replace π ..
add_action( 'forminator_post_data_field_post_saved', function( $post_id ){
	$_POST['forminator_post_id'] = $post_id;
	add_filter( 'forminator_replace_form_data', function( $content, $data, $fields ){
		if( ! empty( $_POST['forminator_post_id'] ) && false !== strpos( $content, '[post_url]' ) ){		
			$link = preg_replace('#^https?://#i', '', get_permalink( $_POST['forminator_post_id'] ));
			$content = str_replace( '[post_url]', $link, $content );
		}
		return $content;
	}, 10, 3 );
} );
