Phone number does not show prefix in HTML / E-Mail Notification
-
Dear Forminator Support Team
When using the Phone number in Forminator forms, the number does not contain the country prefix in the variable for HTML fields and E-Mail notifications.
For example, when the Phone number is selected with +33 for France upon filling the form, and the user enters his number “123 456 78 90”, the variable {phone-1} only shows the entered number without +33 as country prefix.
Could you please fix the issue, so the phone variables (e.g. {phone-1} ) also displays the country phone prefix? For example: +33 123 456 78 90 ?
We’re using Forminator 1.42.2 together with WordPress 6.8.
Thanks a lot!
-
This topic was modified 1 year, 1 month ago by
fritz91.
-
This topic was modified 1 year, 1 month ago by
-
Hello @fritz91
I tried to replicate the issue, using the same plugin version, but I couldn’t. When I submit a form with a phone number, both the submission data and the email notifications that shows either all the entries of the form, or just the phone field alone, shows the country prefix correctly.
Can you share us the page in your site that contains the form, so we can check it?
Also, please go to the list of forms in your site, and export the form that contains the phone field with the issue. You should get a file, upload it to a cloud file-sharing service and share it here, with the public permissions so we can download it and test the form.Looking hearing for you soon.
Kind regards,
Jair.Dear Jair @wpmudevsupport15
Thanks a lot for your response. We have a summary at the end of our form, before someone can finally submit their entries, using the HTML field tile. It is configured as follows:

This is how the end user enters his phone number in frontend:

When the user reaches the summary part of the form, before submission, he/she only sees this, failing the country prefix at the phone number:

The form is not yet live on our website, since the entire site is still in development. The e-mail notification seems working correctly after a few tests. It works also correctly when we take a look at the “submissions” in the WP admin console. Therefore, it seems only be a bug within the HTML part of the form, as shown above.
Hope you can support. In case you need the full form, I can send it privately.
-
This reply was modified 1 year ago by
fritz91.
Hi @fritz91
Please email us at: wpsupport@incsub.com
Subject: ATTN: WPMU DEV support – wp.orgPlease send:
– Link back to this thread for reference (https://wordpress.org/support/topic/phone-number-does-not-show-prefix-in-html-e-mail-notification/)So that we can take a closer look at you case.
Kind Regards,
KrisThe form is on it’s way by E-Mail. Thanks a lot for your help!
Hi @fritz91
Thank you for the form, we could replicate it now and I reported to our developers.
Unfortunately, I can’t see any easy solution for this, we escalated it to our second line support team so we can see if any hotfix is doable, we will keep you posted.
Best Regards
Patrick FreitasHello @fritz91,
I hope things are going well for you.
Our Second Line Support team have prepared a workaround, which is a hotfix, to resolve the issue.
Kindly download the script from here: https://gist.github.com/wpmudev-sls/df88ed6d23f5d9c52b86eb1f90ca45f7
Here are the steps to adding the above script as add mu-plugin to the site.
1. Navigate to File Manager and Look for the public_html directory path or wp-content.
2. under this, you will get the mu-plugins directory; if the folder does not appear, you can create it as mu-plugins.
3. Create a new PHP file, “forminator-dial-code-html-summary.php”
4. Paste the code under the above-mentioned .PHP file.
5. Change the form ID in the file with 48334.
6. Save the file & check.If you still need more information on creating mu-plugin, then you can check this guide:- https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
Please apply the above script on the staging site before adding it to the main site and share the results with us.
Thanks & Kind Regards,
Imran KhanHello Imran @wpmudev-support9 ,
Hope you’re doing well too! Thanks a lot for your help, much appreciated!
I’ve followed the mentioned steps and changed ‘forminator-module-48334’ with my form ID 130, like this: ‘forminator-module-130’ . Unfortunately, it doesn’t seem to work on our website. The phone number is still displayed in the summary without prefix. When looking into the plugin must-use, the fix is mentioned as Dial code on summary. I’ve also tried to unpublish and republish the form, but that didn’t work either. We don’t use any caching at the moment, so that shouldn’t be a problem as well.
Is there something I’ve overseen?
Thanks again and Best Regards
-
This reply was modified 1 year ago by
fritz91.
Hi Kris @wpmudevsupport13
Thanks a lot for getting back to me. Unfortunately, I didn’t receive any E-Mail and also double checked our spam-boxes. Could you send otherwise the information per private message? Or reply at my E-Mail from 1st May 2025 at 22:27 (CEST)?
Best Regards!
Hello @fritz91,
I hope things are going well for you.
We followed up on the email. Can you please check and respond?
–
Kind Regards,
Imran KhanHi @fritz91,
Trust you are keeping well.
We have responded to your email. Please take a look at the email and get back to us so that we can help you further.
Best Regards,
Nebu JohnHello @wpmudevsupport14
Thanks a lot for your E-Mail. We´ve returned your message with further details.
Best Regards
@fritz91Hello @fritz91,
I hope you’re doing well.
Our team has reviewed the code and page. Based on that, they’ve provided an improved version of the code, which will target the page only.
Can you please replace the given code with the existing one on the site and share the outcome with us?
<?php /** * Plugin Name: [Forminator Pro] Dial code on summary * Description: Add phone field's dial code on HTML summary. * Author: Prashant @ WPMUDEV * Task: SLS-7019 * Author URI: https://premium.wpmudev.org * License: GPLv2 or later */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } add_action( 'wp_footer', function () { global $post; if ( ( ! is_a( $post, 'WP_Post' ) || ! has_shortcode( $post->post_content, 'forminator_form' ) ) && ! is_page( 'buchungsanfrage' ) ) { return; } ?> <script type="text/javascript"> jQuery(document).ready(function($){ setTimeout(function() { $('.forminator-custom-form').trigger('after.load.forminator'); },500); $(document).on('after.load.forminator', function(e, form_id) { if ( 'forminator-module-130' === e.target.id ) { // Updated form ID here var phone_val = ''; var dial_code = ''; $('#phone-1 input').on('change', function(){ phone_val = $(this).val(); dial_code = $(this).parent().find('.iti__selected-dial-code').text(); }); $(document).on('forminator.front.pagination.move', function() { setTimeout(function(){ if ( phone_val ) { $('#html-2 .forminator-merge-tags').html($('#html-2 .forminator-merge-tags').html().replace(dial_code, '')); $('#html-2 .forminator-merge-tags').html($('#html-2 .forminator-merge-tags').html().replace(phone_val,dial_code + ' ' + phone_val)); } },500); }); $(document).on('change', '#consent-1 input', function() { setTimeout(function() { if ( phone_val ) { $('#html-2 .forminator-merge-tags').html($('#html-2 .forminator-merge-tags').html().replace(dial_code, '')); $('#html-2 .forminator-merge-tags').html($('#html-2 .forminator-merge-tags').html().replace(phone_val,dial_code + ' ' + phone_val)); } },500); }); } }); }); </script> <?php }, 9999 );We’ve already added the page slug ‘buchungsanfrage’ & form id ‘130’ in the code.
Please give it a try and share the outcome with us.
–
Kind Regards,
Imran KhanDear Imran @wpmudev-support9
Thanks a lot for your reply. After updating the code, the issue has been fixed and the prefix is now visible in the summary, before submitting the form. Well done!
Best Regards
@fritz91 -
This reply was modified 1 year ago by
The topic ‘Phone number does not show prefix in HTML / E-Mail Notification’ is closed to new replies.