How to format a text field for credit card numbers?

OK, I found this conversation, http://forums.adobe.com/message/3598185, who gave a useful overview and I adapted the code appearing in to make sure that the user types in a 16-digit number, and he told them to just do it if they do not.

Here's my problem:

With the code that appears, I can either get a unique 16 digit string (e.g.: 1234567890123456), or I have to do the user to manually type in the spaces to get the usual format of the CC (1234 5678 9012 3456).

What I hope is a code that will allow me to allow the user to just type in 16 continuous digits, but which will then display that entry into the format expected. (So user 1234567890123456 types, but the field when they tab or click out of it will show 1234 5678 9012 3456)

Here is the code I have so far (as I said, almost word for Word copied from the link above):

On the Format tab, under Custom Script Format:

function checkFormat (s) {}

If (! s) return true;

var r =]

/ ^ \d{16}$/

];

Return AFExactMatch (are, s);

}

On the Format tab, under typing a Script custom:

(function () {}

If {(event.willCommit)

var isValid = checkFormat (event.value);

If (! isValid) {}

App.Alert ("Please enter a valid credit card number without spaces or dashes. 16-digit", 1);

Event.RC = false;

}

}

})();

I'm sorry it's so simplistic. Although I rooted around in other languages (HTML, C++) programming, so I'm not a complete noob, I don't know anything about Java at all...

Thanks in advance!

Tags: Acrobat

Similar Questions

  • How to set the text field for the credit card number?

    Hi, this seems like it should be a no-brainer in the Properties menu, but what is the best way to add a credit card number to a form?

    I have mine set up like a text field > category format: number > decimal: 0 > Style separator: (by default with the comma, but not what I want, of course)

    and the symbol > No.

    Is there an easy way to create 16 character space to the digits of the credit card?

    Thanks in advance

    Under Format, select special, then arbitrary mask and enter the mask: 9999 9999 9999 9999

  • How to make a text field for view-only / editable based on a user of APEX

    Hello

    I have a form with fields of 10-20 to assume.
    When the user - Admin logs, I want to field1 as editable, but when another user... User1 connects, I want to do this Field1 as display only... how I can do.

    Thank you
    Deepak

    Deepak

    You can remove the "View only" condition on the field and add this piece of javascript in the "foot" of the definition of the page

    
    

    CITY

    Published by: city has 12 August 2009 15:41

  • How to create a text field containing text/label which can be modified by the end user?

    Hello

    I'm trying to figure out how to create a text field containing text or a label that can be changed by the end user. Can do something like this in LiveCycle?

    Below, I have a text field that contains a question and another text field where the user will enter their answer. Is there a way to allow the end user to change the text of the question, as shown in the example?

    Capture.PNG

    Hello

    If you used a standard text for the 'legend' field you could set the value by default (in the value of the object palette tab) in the legend and the legend of the value None (in the page layout palette).

    Concerning

    Bruce

  • How can can add text fields in the form automatically pdf document?

    I use Adobe Acrobat X (10.1.3) installed on Windows 7 to create pdf forms. My document is very similar to a "lined paper A4 notebook.

    I want to add the text field for each row of lined notebook, so people will be able to write what they want line by line.

    As my document has 20 lines in each page, and a total of 64 pages, I won't add these fields one by one. (drawing of rectangles with precision and aligning each other, assigning separate 'field name' to ensure solid mounting.)

    Property 'Set the Multiple field' within the right - click cause misalignment during 5-6 lines statement on the other.

    You have any suggestions or work around I can receive?

    See Doc.addField. If there is a model for the positions lines on each page, then you can generate the positions in JavaScript and use Doc.addField to set the text fields.

  • Text fields for export in CS4

    I believe that it is possible to create and export text fields for the completion of a PDF file but can't find this feature in my (albeit) version of InDesign CS4. Does anyone know if it is something that only became available in CS5 go?

    Grateful for any help.

    Michael

    CS6 forward.

  • How to create the text field to work with mathematical applications in Muse?

    How can I create text fields to work with the Muse?

    Example:

    A + B / 20 = C

    What to do with the Muse?

    Even more... I could put it on a mobile app with Muse?

    Hello

    Unfortunately not. But what you can try is to use a certain type of Javascript on your page to Muse and achieve this goal

    A code example can be seen here, example Code snippets | Qualtrics

    Output: online survey software | Survey of Qualtrics Solutions

    Hope this helps

  • Text field for the (nieme second word) on the Page

    The script adds text fields on a page based on the search for the word DATE.

    This script must be changed to add the text field for second occurrence of the word DATE only on the page and NOT the first occurrence of the word.

    Currently, the script adds a text field for all occcurances of the word DATE.

    Any help will be greatly appreciated.

    Thank you.

    / * Add on manual transmission date text field * /.

    var this.numPages = NUMPAGES;

    for (var k = 0; k < numpages; k ++)

    / * 1st co - ord = Horizontal, 2nd co - ord = vertical, 3rd co - ord = width, 4th co - ord = height * /.

    {

    {

    numWords var = this.getPageNumWords (k);

    for (var i = 0; i < numWords; i ++)

    {

    var ckWord = this.getPageNthWord (k, i, true);

    If (ckWord = 'DATE')

    {

    var q = this.getPageNthWordQuads (k, i);

    Convert quads in the rotation by default user space

    Userspace used by links.

    m = (new Matrix2D).fromRotated(this,0);

    mInv = m.invert)

    r = mInv.transform (q)

    r = r.ToString)

    r = r.split(",");

    var f = this.addField ("Date", "text", k,

    ([r [0] * 1.10, r [1] - 10, r [2] * 1.3, [5] r-15]) ;

    }

    }

    }

    }

    Try something like this:

    var this.numPages = NUMPAGES;

    for (var k = 0; k)< numpages;="" k++)="">

    var nDateCount = 0;  Initialize counter

    numWords var = this.getPageNumWords (k);

    for (var i = 0; i)< numwords;="" i++)="">

    var ckWord = this.getPageNthWord (k, i, true);

    If (ckWord = 'DATE') {}

    nDateCount += 1;  Incrementing counter

    If (nDateCount == 2) {}

    var q = this.getPageNthWordQuads (k, i);

    var m = (new Matrix2D).fromRotated(this,0);

    mInv var = m.invert ();

    var r = mInv.transform (q).

    r = r.toString ();

    r = r.split(",");

    var f = this.addField ("Date", "text", k, [r [0] * 1.10, r [1] - 10, r [2] * 1.3, [5] r-15]);

    break;  No need to keep the current page search

    }

    }

    }

    }

  • How to create the text field that accepts (only Alphabates no numbers or numbers)

    Hey guys,.

    I just want to know how to create a text field that accepts (only text without characters or numbers)?

    I want to insert validation that field only accepts the alphabates no number or numbers are allowed!


    Thanks in advance!

    In the designer, click the field that you need to validate and open the script window, together the menu show drop-down list to validate in the drop-down list and place the code in the script window. Make sure that the language is Javascript and run is defined on the Client. If you don't see the script window goto window-> Script Editor Menu item.

  • How to make a text field repeat several times?

    I have created a form with the name of a client in it - and the name is repeated at the top of each page.  How to make a text field repeat several times? Thank you!

    Make sure that all fields have the same name (LastName FirstName, MiddleName,), then set the binding in the overall binding tab.

    Paul

  • How can I change paypal for credit card payment?

    I would like to change my paypal for credit card payment method.

    We can I change it?

    Hello

    You will not be able to change the payment method paypal to credit card ot vice versa.

    You can cancel your subscription and purchase a new subscription using the method of payment of your choice.

    Cancellation: -.

    Please contact support by calling/chat for cancellation requests and billing queries:

    Contact the customer service

    * Be sure to stay connected with your Adobe ID before accessing the link above *.

    You can also check the help below document:

    https://helpx.Adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html

    Please go through the Adobe - General conditions of subscription as well.

    Plans:-https://creative.adobe.com/plans

  • Audit fieldwork for credit cards...

    Hi all

    I was wondering if someone created a formula to check the data entered in a field is a valid credit card number?  We send a credit card authorization form through EchoSign, and it would be very convenient

    Thanks in advance for the help!

    Blue

    Hi blue,

    Here is the link to get the documentation for credit card fields:

    http://helpx.Adobe.com/EchoSign/KB/EchoSign-credit-card-fields.html

    Let me know if this helps.

    Kind regards

    -Usman

  • How can I stop the sharing of credit card on iTunes?

    How can I stop the sharing of credit card on the same itunes account. \ ?

    sharing with WHO

  • How you format the text in the fields for forms and buttons?

    I can't with that make up a form in InDesign for export in an interactive form in Acrobat. A couple of fields, the text is formatted as myriad as I want. On the rest, it is formatted to Minion and I can't seem to find anywhere to change this. I tried to do a "paragraph style" a character style, formatting a text box and nothing seems to work. Even tried to copy both entitled and their use for the other boxes, but it does not work. They returned to Minion.

    Any ideas?

    Don't know how you ended up with a different formatting, but in all cases, you can only control the choice/the font size in Acrobat, once your form exported in InDesign.

  • How can I add a text field for the main menu?

    I have a project with a menu.  He has a title.  I wanted to add an additional track on the menu, what I had done in an earlier draft.  I would have thought he would have intuitively obvious, as highlighting the existing title I and do a copy and paste.  However, I learned that nothing is intuitive with Premiere elements 12.  Can someone tell me how to get a 2nd title on my main menu?  I have done it before, but apparently did not write it and I was faced with that I falsely assumed would take me 30 seconds to accomplish.  Thank you.

    Rick

    Do you really need a second title for the page in the main menu and the selection of scene or you page fixed for your Adobe title in more than one line?

    I wonder

    I wanted to add an additional track on the menu, what I had done in an earlier draft.

    Is it possible that as soon as you use a theme which came with 'subtitle', as the trip/Beach Resort, not all do.

    Workaround for the title with more than one line of text can backfire on you. But you can try. Excerpt from my first items 13 on this blog

    0019 first Elements 13 movie Menu title question: multiple lines of text


    A first elements 13/13.1 user reports that, if it creates a 3 lines of title text for the main menu of the fake big screen theme in the customization area of Movie Maker project, these 3 lines of text eventually "encoded" in the project of reopening after that that there had been closed.

    We have confirmed this report and extended it to include this problem appears for 13 of Menus other than the fake Widescreen cinema. This issue is not seen in first items 12/12.1 and earlier versions.

    BEFORE REOPENING THE CLOSE SAVE

    Figure 1. Main menu of Spring Flower home with 3 lines of text, as seen before the closure of the Reopen

    AFTER THE REOPENED NARROW SAVE


    Figure 2. Spring Flower main Menu title initially with 3 lines of text, as seen from the closure of the Reopen



    The only way found so far to get the final product to have 3 lines of title text for menus in the final product is to customize the theme to the movie Menu in the customization of the Menu movie of the project area, do not save, close the project at this time and can do the burn to.


    Many variables were examined to explain this behavior. So far, no answer for why.

    If you are determined to use a particular theme that comes with the title menu and subtitle, look at the text of the Palette layers layers in the editing menu .psd file (.psd Editor could be Photoshop CS or higher).

    Regarding

    on my project last year that was the menu that I liked with 2 text fields, I have also got rid of the "arrow" shortly before the text that was the menu key.  Anyone know how I do that?  I can't figure that out now.

    Could you be more specific. But, for now, consider... If you Play All text, you double-click to open the text of the amendment, the deleted text, click OK. Play All disappeared. Sometimes, in page and removal of text "main menu" scene selection to the navigation button... double click on the button to open the changes to the text, delete text, press ENTER, and then bar spacing, and click OK.

    Please let us know if everything above the target you wanted to know.

    Thank you.

    RTA

Maybe you are looking for

  • I've always had FREE protection is always available?

    I'm repeatedly asked by PC, Norton etc for protection. I don't want to be scammed. Why s preventing Firefox?

  • When I join my sync account, there is no shown capcha. What should do?

    When I join my Firefox Sync account (24.0 Mozzila Firefox) in the first window, I asks me to enter my e-mail address, password, confirmation of the password, server, to put the tick, if I agree with the terms of use and privacy policy. "But there is

  • iPhoto how to upgrade?

    I just upgraded my OSX Lion to Maverick 10.9.5. I'm unable to open iPhoto now a message indicating that you cannot use this version of iPhoto with this version of Mac OS X. Can anyone suggest how open iPhoto and update and if I can recover my photos?

  • Need firmware for Store.E tv

    Hello! I had to format my TV store because I wanted her to be in FAT32, but now I can't find the firmware on the Toshiba support page and my RD StoreE TV does not work on the TV.Any way I can find the firmware somewhere? Thank you!

  • Wrong frequency is simulated

    Hello I have circuit based on 555 timer which should produce 40 kHz (50% DC) square wave. But Multisim simulate Khz 26,367 only. Calculated circuit by "tools/Circuit Assistant / 555 Timer Assistant /" and checked with the data sheet. This circuit ass