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

  • Home
  • SEARCH
  • 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 8808281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:35:01+00:00 2026-06-14T02:35:01+00:00

I have a plugin using jQuery that modifies an input to give it a

  • 0

I have a plugin using jQuery that modifies an input to give it a formatting mask when it is blurred, however I don’t want to send through the formatted value when the form is submitted.

Is there a way I can intercept the parent forms submit event, adjust the value of the element to remove the mask, and then continue the submit without having to define it for every form that uses an input with the plugin?

The other option of course is to use a hidden input and store the raw value in that, and use the unnamed input to display the mask, but I would like to avoid extra markup if I can (plus it would be a handy trick!)

  • 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-06-14T02:35:02+00:00Added an answer on June 14, 2026 at 2:35 am
    $("#formid").submit(function(e){
    
    
        e.preventDefault(); //prevent the form from submitting
    
        var formatted_string = $("#formatted_input"); // get the formatted string you want to unformat
    
        var unformatted_string = formatted_string.replace(/regularexpression or string to be replaced/,'replacement string');  // use .replace() function to find and replace either a string or regular expression to undo your previous formatting
    
        $("#formatted_input").val(unformatted_string);       // set the input value as the new unformatted value
    
        $(this).submit(); //submit this form
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the jquery metadata plugin, I have an element on my page that looks
I'm using the jquery plugin boilerplate as found here . However it mentions that
I have a custom developed WordPress plugin that is using jQuery 1.4 and for
Using jQuery plugin jEditable. Problem I'm having is that I want whatever is editable
I'm using the jQuery form wizard plugin. I have 20 questions that each have
If I have a jQuery plugin using the normal standard of: (function( $ ){
I have a plugin for uploading files using jquery uploadify. After calling a method
I'm using jQuery validation plugin. I have two images: first background of label, when
I am using jQuery fullcalendar plugin , I have tried altering this many different
I am using jquery validation plugin for form validation. I have added a custom

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.