Custom Telephone field not working -...

User 2140875 Photo


Registered User
364 posts

Hi,
Create form for our annual auction. Located here: https://www.rascal.cc/auction/

The Phone field is a reg expression set to only accept numbers using a script that Eric shared. It should add the parenthesis a space and "-" to format numbers entered, e.g. 5412337865 to (541) 233-7865. It works perfectly when I preview the form. But when I export it and then upload via ftp the phone field stops working.

Any help would be appreciated.

Here's what is in the custom reg expression:
/^\([0-9]{3}\) [0-9]{3}-[0-9]{4}$/

Here is the HTML script:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">$(function() {
$("input[name='phone']").keyup(function() {
var curchr = this.value.length;
var curval = $(this).val();
if (curchr == 3) {
$("input[name='phone']").val("(" + curval + ")" + " ");
} else if (curchr == 9) {
$("input[name='phone']").val(curval + "-");
}
});
});</script>
User 187934 Photo


Senior Advisor
20,181 posts

Hi Galen,
Change the JQuery link to https.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2140875 Photo


Registered User
364 posts

Thanks Eric,
It works now. How did you ever know that?
Do you have an idea why other forms I use that don't have the "s" still work?
For instance this one: http://warerally.com/contact-us/

Thanks again.
User 187934 Photo


Senior Advisor
20,181 posts

It's because that domain is http. When you have a domain setup for https all absolute linking has to have the https.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.