Troubleshoot Phone Number Leading Zero
If phone numbers are appearing in your WhatConverts Lead Manager without their first digit, the number is likely being processed as a mathematical integer rather than a text string. This is common with international phone numbers that begin with a zero, such as UK or Australian landlines, where the leading zero is stripped because it holds no mathematical value. This article explains where the issue originates and how to fix it.
The form field is using the wrong HTML input type
Using <input type="number"> tells the browser to treat the entry as a numerical value, which causes the leading zero to be removed before the data reaches WhatConverts. This is the most common cause of missing leading zeros.
How to fix the form field input type
To troubleshoot this issue:
- Open your website's HTML and locate the phone number input field on your form.
- Confirm the field is using <input type="number">.
- Change the input type to type="tel" to ensure the browser treats the entry as a telephone number string and preserves all characters including the leading zero: <input type="tel" name="phone_number">
- Save the change and submit a test lead with a leading zero to confirm the full number appears correctly in your WhatConverts Lead Manager.
A custom script is processing the phone field as an integer
If you use a custom script to send lead data to WhatConverts, the phone field may be defined as an integer data type, which will strip the leading zero before the data is passed through.
How to fix data type handling in a custom script
To troubleshoot this issue:
- Review your custom script and locate where the phone number field is defined or processed.
- Confirm the phone field is explicitly defined as a string or text type rather than an integer.
- Update the field definition to enforce string formatting and retest the form submission.
The leading zero is present in WhatConverts but missing in your CRM or spreadsheet
If phone numbers appear correctly in WhatConverts but lose the leading zero after being exported to a CRM or a tool like Google Sheets or Excel, the destination system is reformatting the data as a number.
How to fix formatting in spreadsheets and CRM destinations
To troubleshoot this issue:
- Open your Google Sheets or Excel file and locate the column containing phone numbers.
- Select the column, open the format settings, and change the column format to "Plain Text".
- Re-import or re-export the lead data and confirm the leading zeros are now preserved.
- If the issue is in a CRM, review the field type settings for the phone number field and ensure it is configured to accept text rather than numeric values.
The form is not requiring a correctly formatted phone number
If users can submit the form without entering a leading zero, you can use Regex validation to enforce the correct format before WhatConverts captures the lead.
How to use Regex to require a leading zero
To troubleshoot this issue:
- Open your website's HTML and locate the phone number input field.
- Add a pattern attribute along with type="tel" and required to enforce a format that begins with zero: <input type="tel" name="phone" pattern="0[0-9]{9}" required>
- Test the form by submitting a number without a leading zero and confirming the browser prevents submission.
- Submit a correctly formatted number and confirm it appears in full in your WhatConverts Lead Manager.
Related Topics
Get a FREE presentation of WhatConverts
One of our marketing experts will give you a full presentation of how WhatConverts can help you grow your business.
Schedule a Demo