Phone number fields

Hello

I have my phone set up number fields so that when the user enters a 10-digit phone number, they tab above and it appears as such: (999) 999-9999. I was wondering if there is a script that can be used to allow only the codes 204 and 431.

Thank you in advance for any help you can give me.

NikDk

Form1.Page1.Subform1.telephone::exit - (JavaScript, client)

validat formats include 1234567890, (123)456-7890 and (123) 456-7890

var regex = / ^-(?) () \d{3})\) ? [- ]? ({\d{3}) [- ]? (\d{4})$/;

var str = this.rawValue;

If (regex.test (str)) {}

var areaCode = "";

Regex = / ^ \d{10}$/;

If (regex.test (str)) {}

the format is 1234567890

codeZone = str.substring (0.3);

If (ZipCode == '204' | codeZone == "431") {}

"Str =" ("+ str.substring (0.3) +" "") "" + str.substring (3.6) + '-' + str.substring (6.10);

this.rawValue = str;

}

else {}

xfa.host.messageBox ("the area code must be either 204 or 431.");

}

}

else {}

the format is (123)456-7890 or (123) 456-7890

codeZone = str.substring (1.4);

If (ZipCode == '204' | codeZone == "431") {}

this.rawValue = str;

}

else {}

xfa.host.messageBox ("the area code must be either 204 or 431.");

}

}

}

else {}

xfa.host.messageBox ("Please enter the 1234567890 format phone number, (123)456-7890 or (123) 456-7890" ");

}

Steve

Tags: Adobe LiveCycle

Similar Questions

  • Set the focus on the phone number field when validation fails

    Hello

    I have a text field set up like a field of phone number, with the following text in the change event to accept only numbers:

    if(xfa.event.newText.match(/[^0-9]/)){
    xfa.event.change = "";
    }
    

    The validation of the model, I have this mask on all tabs (display, editing, Validation and data):

    Text {'('999') ' 999-9999}

    I want the user to be able to just enter numbers and have the parentheses and added automatically dash ["123-456-7890"].


    How the focus to stay on the field when it is not validated? (e.g., insufficient or too many digits).  I have looked at validationState , but couldn't find out how to use it (I am a javascripter noob).

    Thanks for any help.

    in the case of output of your domain:

    if (this.rawValue.length !=9) xfa.host.setFocus(this);
    
  • Regarding the Validation Manager for phone number

    Hi all

    I need to use a validation Manager so that I can post the phone number field that is available by default in the console of the IOM in creating user. I want to be able to verify that this phone number is 10 digits, and a few other validations we want to do. Now that I saw the doc Oracle which shows a validation example on the link Manager: http://docs.oracle.com/cd/E14571_01/doc.1111/e14309/oper.htm. The code is displayed as below:

    throws a ValidationException ValidationFailedException {}
    Parameters HashMap < String, Serializable > = orchestration.getParameters ();
    String password = (parameters.get("usr_password") instanceof ContextAware)
    ? (String) (Parameters.get ("usr_password")) .getObjectValue () (ContextAware)
    : (String) parameters.get ("usr_password");
    If (password.contains("$")) {}
    throw new ValidationFailedException();
    }
    }

    but I suspect there's a missing line above what should be as public EventResult run (long processId, long eventId, orchestration of the Orchestration). That said, the usr_password is the parameter that happened here using the parameters.get () function. However I can't figure out how I can check for the phone number of the same way? It will be like usr_telephone_number? Please guide me still.

    Also, I need to do as a manager of validation for email address where in the Organization the user selects should be the domain of the email for example address field. If the user selects a fictitious organization, then the validation of the email should work to check if the entered domain is [email protected]. So for this I think I might need the details of how to get the selected organization and the e-mail address entered. Can you please help me to get the names of parameters for these parameters? Or direct me to the doc or a link where it is mentioned? Don't want to do trial and error with an event handler. Please help me.

    Thank you

    Attributes are referenced by the 'attribute name', i.e. 'Phone number' and 'Email' for the attributes you want. To the organization that you use "act_key" However this only returns the key of the object of the organization database - and not its name. If you need the name for validation, you will need to get this through the OrganizationManager, for example to get the name of the Organization to the organization with the act_key key:

    OrganizationManager orgmgr = (OrganizationManager.class) Platform.getService;
    Set = new HashSetuploading.
    try {}
    org = orgmgr.getDetails (act_key, uploading, false);
    } catch (Exception e) {}
    }
    orgName = (String) org.getAttribute ("name of the Organization);

    Note that act_key can be returned as a long and the need of conversion to a string first.

  • Web form: can not get the phone number appears in the email notification

    http://www.rockmitzvah.com/contact/contact4.htm

    try adding a phone number field so that my client can call leads. I tried the phone number field two to the need and not. The resultant thank you screen and just email show that without the phone number:

    Summary of submitting a web form:
    Your name
    j a
    Email address
    [email protected]
    File number
    4388779
    Message
    Phone number

    What is a workflow problem? How should I do?

    Thank you

    j

    Hello

    Name of your phone number field does not match any field of telephone number of British Colombia. You have name = 'Phone number', but BC names name = "HomePhone" and name = "mobile phone".

    Try to reinsert this form on a page and submit.

    See you soon,.

    -mario

  • Adding a '-' in the name field for things like SS # or phone number

    This seems to be a simple question, but a search is not just do what anyone.  Maybe I don't know what to look for?

    I'm doing in the fields with the hyphens "-" already in place for the fields as a social security number or phone number.

    Example of phone:

    A person in the field of 5555551212 types and fills "555-555-1212" automatically by moving the cursor to the next empty space when this section of the field is complete.

    Example of the art:
    A person types in 223233923 and the same thing happens with dashes: 223-23-3923

    I have the same question for Dates too, but with slashes: 07202012 would result in the 20/07/2012.

    This is probably a simple framework, but I don't know where to look.  Help, please!

    PS. I know how to change the 'format' to force the user to ENTER the '-' or ' / ', but what about automatically place there for them or have aready here?

    PPS. I found the Script 'Auto-onglet' here: http://www.planetpdf.com/developer/article.asp?ContentID=javascript_setfocus_method_f & gid = 6267 however, which forces me to cut to the top the field in 3 different areas and I would avoid it if I could.

    You can use the following to format your SSnumber:

    Put this in a document-level script:

    function formatSSN () {}

    var s = event.value

    var re = /^(\d{3}) [---]? (\d{2)} [ -]? (\d{4})$/;

    If (re.test (s)) {}

    var match = re.exec (s);

    Event.Value = match [1] + '-' + match [2] + '-' + match [3]

    }

    }

    Put this in the Script of custom Format for the fields that you want to format:

    formatSSN)

  • How to disable the recognition of phone number on a mac

    When I type the 10-digit numbers in calendar events, Notes, and I think other places, they become a link that opens FaceTime, whenever I click on them (for example, to make a correction). None of them are still phone numbers. I have not and do not want to use applications that exhibit this behavior. How can I disable it on my Mac, so no numbers are never treated like phone numbers, unless of course they are entered into a field which is expressly defined as a phone number (for example in Contacts)?

    I don't think there is a way to disable this option, although there might be a way through the commands from the Terminal.

    To edit the recognized text auto, long - click on the text.

  • Add dashes to the phone number

    one of my clients trying to access his account of Time Warner but their web portal.

    When it comes to the text box that requires phone number he wants to add dashes (for example #-#-#)

    using the IOS phone key throws up, there is none, and by clicking on the back (<) symbol directs the user to the keyboard, but it removes the phone field and takes her back to a text tabled. Try to go back in the phone keyboard field changes back to the keyboard.

    Is there a way to get around this, or is it inherent behavior IOS?

    iPhone 6

    IOS 9.2.1

    So what happens when the complete phone number is entered without hyphens?  It should work.

  • BlackBerry Z10 writing new Messages - Contacts combines a Mobile phone number, home

    When I chose to compose a text Message and select by a Contact who has multiple phone numbers stored, the phone selects the telephone number of the Contact homepage default rather than their Mobile phone number. I'm doing something wrong?

    I did a little experiment, created a group with 1 contact, send a text message to the group, sms went to the house number.

    I deleted then house number (which was at the top of the list) then added a new home field. After that the number of publishing house has yet shown on the top of the list, but sms now went to the Mobile number.

  • Get the phone number of mixed string

    Hello

    I'm new to the development of BB and I can't seem to understand this.

    What I want to do is to take a mixed string (the event details for a google calendar event) and get a string that contains something that looks like a phone number. It seems to be already features to recognize the phone numbers of a string there are things like ActiveRichTextFields, and I can get my BB to highlight these regions 'active', but I can't get this phone in a separate channel number.

    I'm totally lost on this, any help would be appreciated.

    Welcome to the forum.

    I'm not aware of any API that allows to determine what parts of a string BlackBerry will recognize by default.  I have never seen this in a field that is displayed on the screen.

    My first reaction is that you have to watch yourself to find these special criteria.  I hope that others have an opinion / a different option.

  • getDevicePhoneNumber() provides the phone number with the unicode left-to-right mark

    I use getDevicePhoneNumber (boolean format) ( http://www.blackberry.com/developers/docs/4.6.0api/net/rim/blackberry/api/phone/Phone.html#getDevice... (boolean)) to get the telephone number of my camera. I know that maybe it's not the actual number. I also can't use something else as the pin of the device. I use it to fill a field "my phone number" by default that can be edited manually in the case where the number is not correctly being read on the SIM card.

    It works really well and displays the phone number in the field. However, a thorough review to the string of shows that he has the mark unicode '% E2% 80% 8F' in front of the string. This brand is known in unicode (utf-8) "BRAND LEFT-to-RIGHT ' (sources: http://www.tachyonsoft.com/uc0020.htm and http://unicode-search.net/unicode-namesearch.pl?term=mark ).

    I only experienced it in BB OS 4.6 devices (does not check 4.7 yet), but it seems not to happen in OS 4.5 and below.

    Were there changes to the orientation of the chain in OS 4.6?

    Can I get rid of this brand using String.trim (); or I have to use something else?

    This problem persists on my 9000 "BOLD", but none of my other GPS phones.

    Because it was a pain to try to understand, here's the code I used to solve this problem.

    private String trimPhoneNumber(String phoneNumber){
        byte phoneBytes[] = phoneNumber.getBytes();
        int length = phoneNumber.length();
        int offset = 0;
        if ( phoneBytes[0] == 0x3F ) {
            length--;
            offset++;
        }
    
        return new String(phoneBytes, offset, length);
    }
    
  • Strange thing happens by adding the phone number

    Hi all

    I'm tring to add a phone number of the phone book.

    However, my application brings original request for telephone directory of the instrument. This is the normal behavior?

    I want to add in silence, and another thing is that when I click on trackweel on objectChoiceField, it brings also the device [honebook application.

    I used the trackwheelClick() action.

        public boolean trackwheelClick(int status, int time)
        {
            Contact contact=null;
            int type=0;
            Field leafField =  this.getLeafFieldWithFocus();
            try
            {
                BlackBerryContactList contactList =
                    (BlackBerryContactList)BlackBerryPIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
                PIMItem pimItem = contactList.choose();
                contact = (BlackBerryContact)pimItem;
    
            } catch (PIMException e)
            {
    
            }
            if (leafField == okBttn)
            {
                contact.addString(Contact.NAME_FAMILY, BlackBerryContact.NAME_FAMILY, givenName.getText());
                contact.addString(Contact.NAME_GIVEN, BlackBerryContact.NAME_GIVEN, familyName.getText());
                if (pChoice.getSelectedIndex()==0)
                    type = BlackBerryContact.ATTR_MOBILE;
                else if(pChoice.getSelectedIndex()==1)
                    type = BlackBerryContact.ATTR_WORK;
                else if(pChoice.getSelectedIndex()==2)
                    type = BlackBerryContact.ATTR_HOME;
                contact.addString(Contact.TEL,type, areaCode.getText() + phoneNum.getText());
                try
                {
                    contact.commit();
                } catch (PIMException e)
                {
    
                }
            }
            return false;
        }
    

    Please help me solve this problem.

    Thank you

    DK

    Please refer to the example here:

    How to-AddressBook access contacts
    Article number: DB-00147

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800363/How_To _...

  • BlackBerry Smartphones how hide or show my phone number of my BB Bold 9000 to others?

    Hi guys,.

    I tried to research this topic in the help BB website and I got this:

    Go to Options-> General Options-> the following powers:

    (1) to request that your phone number is hidden, change the restrict my identity field to always.

    (2) to request that your phone number is displayed, change the restrict my identity field to never.

    (3) to request that the network operator decide to hide or display your number, change the restrict my identity field to determined network.

    However, I can't find the "General Options" function in my BB Bold 9000. Can someone enlighten me on this please?

    Really appreciate!

    Best regards

    Ken

    Hi guys,.

    I called my local is a Service of Telco and was able to solve this problem.

    I had to press the call (green) first to join the list of calls before pressing the menu button. This is the selection of the General Option.

    It is also for those who have the same problem.

    See you soon!

    Ken

  • Activation - need a phone number for the full activation of Windows 7 upgrade.

    I finished an upgrade to Windows 7 Home Premium (64 bit) to Windows Vista Ultimate (32 bit). I had to do a CUSTOM installation, because I have also improved the C:\ drive for a RAID 1 configuration. It necessary to re-formattting the drives in the RAID unit eliminating the contents of the disc. Attempt to activate Windows 7 product fails because there is no field to enter the full Windows Vista Edition activation key.  In addition, your instructions to locate a phone number for my operating system have no choice of site of "phone".  All I need is an activation of the PHONE NUMBER.

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

    or

    Direct activation number: (888) 725-1047

    1-800-936-5700

  • Display the format US phone number - best practices

    JDeveloper 12.1.3

    -Telephone table has field VARCHAR2 with phone numbers. All records have exactly 10 numbers (characters) length

    -In the user interface, I want to show number xxx-xxx-xxxx, that is to say with af:outputText or similar device

    -observe that I am looking for display, and no to entry/edit phone number

    -in search of best practices

    What I did but am not satisfied:

    -In the t 3 has created a transitional attributes with the default SQL string. For example:

    Phone1To3: substr (Phones.Phone, 1, 3)

    Phone4To6: substr (Phones.Phone, 4, 3)

    Phone7To10: substr (Phones.Phone, 7, 4)

    Then in file jsff (the table component):

    <af:outputText value="#{row.Phone1To3}-#{row.Phone4To6}-#{row.Phone7To10}" shortDesc="#{bindings.Phones.hints.Phone.tooltip}" id="ot2222"/>
    

    Another way (better, easier)?

    In my view, that the best practice is to do your own converter in this case you will not need transitional attributes as you did. After doing a converter, you can add this converter inside outputText inputText. .. to display the required format

    To find out how a converter, you can check this url

    Sameh Nassar: Create custom converter

  • Phone number format

    Hi team,

    need your help, I am using oracle 11G.

    My phone field is of type varchar2 and it shows data on format below.

    81668798343000000000000

    I wanted to remove unwanted zeros.

    result should be 816687983430

    Please help me out here

    Hello

    siebelD kirjoitti:

    Hi team,

    need your help, I am using oracle 11G.

    My phone field is of type varchar2 and it shows data on format below.

    81668798343000000000000

    I wanted to remove unwanted zeros.

    result should be 816687983430

    Please help me out here

    No, you don't say what the rules involved in this area. Otherwise it's hard to know that a zero belong to a phone number and rest zeros does not work.

    I guess the length of phone number is 12

    Select substr ('81668798343000000000000', 1, 12) of double

Maybe you are looking for

  • photos incompatible downloads compared to the clouds between various apple devices

    I put photos on el capitan on my imac and some projects (i.e. slide shows) do not download.  However, they download when I put pictures on my mac pro book.  How can I get these projects on my imac to the Cloud?  Thank you.

  • Dell Inspiron 9400 display problem

    Hi all Last Tuesday, on the left side of the screen, a vertical black stripe about one and a half inches wide is appeared, the next day, that he had changed to a thin black vertical line has appeared in the middle of the screen. I did the full diagno

  • Configure the timeout and session timeout in a group policy.

    I want a L2L tunnel to establish a period of time, this tunnel is established in a PIX 515E. Then I had seen that we must configure the idle time in group policy, but I have no ' t know the difference between the idle timeout setting and the session

  • How can I change lang victory. form Arabic to English?

    How can I change lang victory. form Arabic to English?

  • Merge two photos?

    I am trying to merge two photos using the new HDR feature photo fuse->. I found some tutorials but nothing happens for me after that I selected two photos and clicked on Photo-> merge-> HDR Photo. A proposed tutorial that a contextual overview and a