You are viewing limited content. For full access, please sign in.

Question

Question

Automatic Hyphens in Forms Field

asked on January 30, 2017

When entering a number with hyphens into forms, can I set it to automatically insert the hyphens without having the user type them in?  If so, how?

For example, the pattern is xx-xxx-xx-xxxxx.  If I enter 112223344444, can I make it appear as 11-222-33-44444?

 

0 0

Answer

SELECTED ANSWER
replied on February 2, 2017

I did need to install the file.  I discovered that after I knew that the process was called masking.  I was able to locate the help files.  Sorry for the slow response.  I have it working now.

For those who are new to this, I suggest reading instructions very carefully.  I had put my code in the CSS section, as opposed to the JavaScript section.  Took me a while to figure it out.

I'm new to coding anything.  I guess I will learn!

 

1 0

Replies

replied on January 30, 2017

What you are asking for is a feature called masking. It is not currently available natively in Forms as of version 10.2. If you do a search for field masking in Answers, you will find some others who have come up third party solutions.

1 0
replied on January 30, 2017

I will try that.

Thanks!

0 0
replied on January 30, 2017
$(document).ready(function () {
  $.getScript('http://formsServerName/Forms/js/jquery.mask.min.js', function () {
    $(".phone input").mask("(999)999-9999");
  });
});

 

0 0
replied on January 30, 2017

@████████

That would require them to have the js file in that location on their server. Do you know where to obtain that js file from?

1 0
replied on January 30, 2017

Yes forgot to add in this step its for v9 but the same steps should work.

1 0
SELECTED ANSWER
replied on February 2, 2017

I did need to install the file.  I discovered that after I knew that the process was called masking.  I was able to locate the help files.  Sorry for the slow response.  I have it working now.

For those who are new to this, I suggest reading instructions very carefully.  I had put my code in the CSS section, as opposed to the JavaScript section.  Took me a while to figure it out.

I'm new to coding anything.  I guess I will learn!

 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.