2 Replies Latest reply: May 16, 2014 9:40 AM by VineetTripathi RSS

    Auto format the text.




      Suppose we have some input text field and we need to auto-format it.

      Say for eg we have text field as phone number ( and the acceptable format is (000)000-0000 ).

      So if the user is filling the form with 1234567890, then it will automatically format it to (123)456-7890.

        • 1. Re: Auto format the text.

          This needs to be implented with a javascript or valueChangeListeer asociated with the input text with autosubmit true.


          The logic will be to check the number of digits and append to your format accordingly.


          Give it a try if u are unable to come up with the code I will post the working code.

          • 2. Re: Auto format the text.

            we can use the jQuery and implement the auto formatted user input values.

            for ref:

            ("#phoneNumber").mask("(999) 999-9999");