Announcement

Collapse
No announcement yet.

Validation Field Formatting Clickfunnels

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validation Field Formatting Clickfunnels

    Hi All.

    Does any one know how to validate mobile phone numbers with Clickfunnels.

    20% of our leads people are only entering (1) number instead of their full phone number.

  • #2
    Toy at what level of validation are you looking to achieve. i.e just that the phone number seems to meet certain formatting requirements, or that the number is a real mobile number?

    Twilio has a free verification API, and then if you want to really validate leads I would look at something like nexmo. Somewhere in between those is checking against the NPA-NXX who the carrier is, but numbers can get ported.

    Comment


    • #3
      Originally posted by ari View Post
      Toy at what level of validation are you looking to achieve. i.e just that the phone number seems to meet certain formatting requirements, or that the number is a real mobile number?

      Twilio has a free verification API, and then if you want to really validate leads I would look at something like nexmo. Somewhere in between those is checking against the NPA-NXX who the carrier is, but numbers can get ported.
      Hey, we just need to validate certain formatting requirements for UK numbers. Minimum of 7 chars and a max of 12 etc.

      Do you know any way to integrate that into Clickfunnels?
      Last edited by Toy; 05-16-2016, 10:15 AM.

      Comment


      • #4
        Toy think you mean minimum of 10 characters and max of 12. UK numbers are formatted like 07xxx, 01xxx or 02xxx where '07' denotes a mobile number and '01' or '02' denote landline numbers. Occasionally you get a 10 digit number but most are 11 digits with no space and 12 with a space.

        E.g. 07xxx xxxxxx (12 digits)

        So basically you want some custom jquery to recognise the telephone field in Click Funnels and apply validation logic?

        Comment


        • #5
          the biggest issue you're facing is actually not click funnels but which type of UK number...

          https://www.aa-asterisk.org.uk/Regul...ephone_Numbers

          Comment


          • #6
            here is an example for "UK" phone number validation "on focus out".

            Code:
            <script type="text/javascript">
            $(function(){
               $('input[name="phone"]').on('focusout',function(){
                  var p=$(this).val().replace(/[^0-9]+/g,'');
                  $(this).val(/^\s*\(?(020[78]?\)? ?[1-9][0-9]{2,3} ?[0-9]{4})$|^(0[1-8][0-9]{3}\)? ?[1-9][0-9]{2} ?[0-9]{3})\s*$/.test(p)?p:'')
               });
            });
            </script>
            put above into your funnel order pages tracking footer code.

            what it does: if the number is valid, it stays, if the number isn't valid once you leave the input field it will empty the input field.

            why: I have no idea how to hook into their form validation. there are validators present inside their JS to validate phone numbers via the parsley.js library they're using but I can't see that this is actually linked to any form. so before I start reverse engineering click funnels, this is the easiest solution. empty field can't be empty because it's required.

            it works here pretty well.

            example:
            http://quick.as/wkn8Hndmj


            edit: now replaces value with cleaned value if valid.

            example:
            http://quick.as/gb0dcrwoy
            Last edited by Tobsn; 05-16-2016, 11:29 AM.

            Comment


            • #7
              Tobsn how would you alter this script to ensure that an error message appeared when the value was cleared from the field?

              Comment


              • #8
                you could add an alert - the issue is that it's probably a lot of work to hook into their validation process - clearing the field makes it empty which makes the required field error out on submit. if you want you can just put an alert in there. I'll give you an example later, busy atm

                Comment


                • #9
                  Tobsn I've noticed this script doesn't appear to work when used outside of a ClickFunnels page. Any ideas why that might be? Do I need to be referencing a specific JS library on my page when making use of the script?

                  Comment


                  • #10
                    It's using jQuery

                    Comment

                    Working...
                    X