Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 469449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:47:01+00:00 2026-05-12T23:47:01+00:00

I mask the input of fields like SSN to contain dashes when they are

  • 0

I mask the input of fields like SSN to contain dashes when they are displayed but would like the value that is submitted to be only the numbers.

For example, my SSN is formated as:

<input type="text" name="ssn" alt="999-999-9999"/>

And upon entering “1234567890” I get the nice formatted output.

123-456-7890

Now I would like only the numbers to be submitted as “1234567890”. Is this easily possible?

For reference: http://www.meiocodigo.com/projects/meiomask/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:47:02+00:00Added an answer on May 12, 2026 at 11:47 pm

    I’m not sure on the etiquette on answering my own question but I actually used a fairly simple solution derived from both of your answers.

    Problems arose from using hidden fields based on the site using the Struts framework and it’s automatic form processing and special JSP form tags. I would change the backend to do all the processing there but as it’s the middle of the day I can’t restart the Tomcat server to load in the changes without crippling operations for a short time.

    On submit I call a function UnmaskMaskedValue() which explicitly sets all the masked values to have a mask not containing the invalid characters.

    function UnmaskMaskedValue() {
      $('#ssn').setMask('9999999999');
    }
    

    This changes the value before any data is submitted to be valid on the backend.

    I appreciate both of your suggestions and would rate you up if only I was able to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement an input mask on Magento and that requires the
I have been putting only jQuery mask so far, but I figured out that
i am trying to mask input with jquery like this on my textbox but
I've got a table an input box that has a money input mask on
I'm looking at the http://digitalbush.com/projects/masked-input-plugin/ I'm calling it like this: $(control).mask('999-999-9999'); And I don't
I have an input mask on my text box like 000,000,000.00 I have the
I want to create different inputmasks like Date Input mask in Javascript. What will
How can create a mask input for number that have percent by jQuery? Do
I've got multiple input fields where they have the same class names. I need
We using jquery input mask from here and a code snippet that sets and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.