Prevention of commas and returns in the text field

I need to prevent the use of commas and returns within a text field in my form. Currently I have working code that prevents the use of commas, but now need prevent a hard return.

That's what I currently have:

VSC. File. Justification::change - (JavaScript, client)

XFA. Event.change = xfa.event.change.replace (/, /g "");

Thanks for the help!

Hello

in order to avoid several characters, you can use a few methods that work.

If (xfa.event.change = ',': xfa.event.change = '\n' | xfa.event.change = '\r') {}

XFA. Event.change = "";

}

or

var notUsed = / | \n|\r/;

If (xfa.event.change.match (notUsed)) {}

XFA. Event.change = "";

}

Tags: Adobe LiveCycle

Similar Questions

  • Year (only) extracted from field Date and display in the text field

    I need extract the year from a field of date entered by the user and display the year in a text field. Can someone help me with the correct script to do this?

    Hello

    It is quite easy to achieve with FormCalc.

    In you the output of the date fields event add the following code:

    textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
    

    Note: This example assumes that your date field formats the date with "MM/DD/YYYY". You may need to change the schema to make it work for your purpose.

  • Preserve the header and footer in the text field flowing through a page

    Hello

    I am creating a form, where the main text field Pounces on the next page (that I go to do). I created two master pages, the first page and the page of continuation. I want the field of main text to expand on the continuation page, while preserving the footer of the main page and the header/footer of the continuation pages. On the continuation page, I have a field name at the top of the page, I want to whether the value of the same text box of the home page, how to achieve this.

    The layout must remain what it 'looks like' on both master pages, I want to just be written in the main area on the first page to continue in the main area of the second page of the text. I want the second page to reproduce as many times as necessary to adapt the text.

    Help! PLEASE, I BEG YOU!

    I have attached my work so far, please do not hesitate to pick up ragged and make it work!

    Gareth

    For 1 issue, you can simply set the binding of this field worldwide and all fields will have the same value. Click on the object and in the object palette, there is a tab link. In the set default binding change None to Global.

    For the 2nd problem, you have a Pg1 field called numberOfPages. This field is used in conjunction with another domain on the master Page2. He shodul not be located on this page. I removed it, then I was able to resize the titleForm subform to fit the space.

    Paul

  • index and exponent with the text field dynamic flash

    Hi all

    Is there a function / TextFormat property / property textField to text index and exponent.

    I have to write @,®,TM , 1025 ABC type of value which are in fact from xml file.

    Thanks in advance!

    Kishor

    Yes, you need to use special fonts for this purpose

  • How to select all the text fields at a given time in Adobe Reader ms?

    I created a document that contains more than one text field I created with Acrobat Pro DC, I want to allow the user the ability to select all fields in order to change the text size/color and fonts at the same time... not having to go through the entire form and must make each field separately. To be a little more specific, the document is two pages with six place/lounge cards per page, designed for weddings and other events. Each place card has a field for 'user name' and ' number of table: my question is...» Is it possible to 'select all fields' in Adobe Reader? If I go to Edition > select all, the program selects all graphics and none of the text fields. Not exactly what I'm missing here and I can not find my answer online. Any information would be greatly appreciated.

    Thank you!

    Jodi

    In this case, you can only change the properties of the text selected within a field. Acrobat Reader cannot change the properties of the text field.

  • cannot change the text field after grouping

    Hi people,

    I have 3 single-line text fields and a logo combined using 'Add parents '.  For some odd reason, I can't select a field to edit text.  I can select them in the assets Panel and change the layout or style, but as soon as I double-click to edit the text, my selection goes to the div parent instead of the text field.  I tried to use the text as well, but it always happening in selection to the parent.  This isn't a big deal since I can change the text later in a Publisher, but it's a little frustrating.

    FWIW, I ran the update of this morning before starting, but I doubt that caused this nothing thanks for any help

    -Kevin

    So sorry Chris, in my frustration, I removed the parent and the group so I can get the item that I wanted to edit, and then recreated the parent.

    However, your description of the differences between the Group and Add Parent in this discussion: http://forums.adobe.com/thread/1361983?tstart=0 probably explains why I have problems.  I think I had GROUPED fields 3 text and then wrapped in this group and the image of the logo in another div with 'Add parents '.  I have probably not been not clicking successfully through the parent company to the group, and then in the text field.  In fact, I was clicking like mad, but probably not on the correct spot for each level.

    Thank you to specify how these elements work.

    -Kevin

  • How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    Hi all

    How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    There is also a checkbox on the dialog box 'Sign' to lock document after signing.

  • I need to create a curved with type text box that heal and return to the next line in the form of curved text. How do I do that?

    I need to create a curved with type text box that heal and return to the next line in the form of curved text. How do I do that?

    1. Draw a set of concentric half circles also spaced, stacked so that the outermost is the most remote.
    2. Use the text tool to add text to the outermost path, thus creating a PathType object.
    3. Select all the paths. Type > threaded text > create.
    4. Text tool: click at the end of the text in the object of PathType. Continue typing.

    > If I do that it will not type more.

    A Warp effect is a direct effect. When it is applied to the type of objects, they are still editable text. The chain will deform, however, the text also, not only the paths to which it is attached. Sometimes you want that, sometimes you don't have.

    JET

  • My iPhone6 has convinced himself that he has a helmet connected - how can I convince otherwise and return to the normal setting?

    My iPhone6 has convinced himself that he has a helmet connected - how can I convince otherwise and return to the normal setting?  I tried turning it off and back on after awhile, but did not.

    Double check with a magnifying glass and a good lighting that nothing has been slain. Then, try insertion and withdrawal of your headphones a couple of times. If this does not work, it may be while the shooting went wrong. In this case, make an appointment at the Genius Bar at your local Apple store for the assessment.

  • I can't my auto signature to look how I want that she keeps returning to the text without spaces

    I can't my auto signature to look how I want that she keeps returning to the text without spaces

    Put

    < br >

    everywhere, you want a line break.

    for example

    My phone number is 01937 534183 if you wish to discuss. < br >
    < br >
    Thank you, < br >
    < br >
    Oliver

  • I just upgraded to Firefox 17.0.1 and now I am unable to what it is concluded from the text fields.

    After the upgrade to Firefox 17.0.1 cannot enter text in the toolbar URL, the search bar, or any text boxes/entry forms/fields on Web pages. When you click on the text field, the cursor is positioned properly and flashes but typing does not generate any text.

    OK the solution to this problem (to fear for me) is completely restart the computer.

    Thanks ideato and cor - el to try to help.

  • cannot stop at several new tabs to open boxes at least three every time I have leave and return to the home page or restart Firefox

    cannot stop at several new tabs to open boxes at least three every time I have leave and return to the home page or restart Firefox

    Hi TGreybeard,

    Have you looked at the Knowledge Base article Firefox opens several times empty tabs or windows after clicking on a link ? There is some good information in there that should help you to solve the problem.

    Hope this helps!

  • Satellite C660-1LD: how to recover and return to the factory settings

    Hi guys,.

    I suffer with any problem on any website a few linked words and when I click on it, an ad. opening of site Web which is a little virus I think and the laptop runs very slowly

    I decided to restart the laptop of the t and return to the factory settings.

    Could you please help me how to restart I'm not really good with computers so if you explain step by step it would be fantastic.

    Thank you

    Hello

    Read the discussions here in the forum of Toshiba product recovery.
    In addition, check this documentation how to use HARD drive recovery:

    + How to recover a Toshiba notebook with the HDD recovery procedure.
    http://APS2.toshiba-tro.de/KB0/HTD1303440001R02.htm

  • When I put the time, she can use the internet, she changes the time on the computer and returns on the internet. What can I do?

    When I put the time, she can use the internet, she changes the time on the computer and returns on the internet.  What can I do?

    Not enough information.  You have provided no context.  You don't say what version of Windows you are using and you don't really describe the situation in many details.  Reading between the lines, it looks like you have a child who has time on the Internet you want to limit.  You do not tell us what tools you use to control this limit online, so it is difficult to recommend the right forum for your post.  Please update your message with a more detailed description of what is happening and what you want to do.

    One thing that comes to mind is using Live Parental control with a Netgear router.  See http://www.netgear.com/lpc.  LPC uses the service OpenDNS (http://www.opendns.com/)

  • When I have something to stick in wordpad and then change the text, I'll then on preview before printing and most of the time the whole document is not there.

    Original title: need help with wordpad problem

    When I have something to stick in wordpad and then change the text, I'll then on preview before printing and most of the time the whole document is not there. I double space between lines and all that is more than one page disappears. I tried all the different formats (no envelope, window envelope, etc.). How can I fix?

    Hello

    ·         What happens if you use another application to preview before printing?

    ·         You are able to print the document correctly, or you receive no error message when printing?

    You try to use Microsoft Word or Notepad to check if you face the same problem.

    First of all, I would like to check to see if print preview is working on a new empty document with only a word in it.

    If Yes, then the problem is the document.

    You may need to clear any formatting, that depends on where you copied from.

    Your rule of printer drivers print preview

Maybe you are looking for