Create a masked INPUT field with country code selector -- 2
$10-30 USD
Completed
Posted about 9 years ago
$10-30 USD
Paid on delivery
Hello, everybody!
I need to create a masked INPUT using Angular.js and jQuery
The site logic is as follows:
1. A user enters the section "Services" by selecting a particular service [login to view URL]
2. On this page browser receives data in JSON format by automatic ajax-request. The data includes next fields: "Mask" it specifies the mask for INPUT, "ServiceID", "DefaultCountry" - two letters of the country which will be selected by default INPUT (this parameter can be omitted)
3. If ServiceID = 1, we have to use an angular Directive, which you will have to write
INPUT must be look like as follow pictures ([login to view URL], [login to view URL])
Requirements of the Directive:
1. It should receive a list of countries by ajax to display them in the drop-down list. I've already have this script, it gives the data in JSON format (you'll be need the following fields: CountryCode - two letters of the country for CSS, CountryName - name of the country to the drop-down list, PhoneCode - the international country code for INPUT)
2. It must formate INPUT field according to the "Mask" parameter (see mask definitions here: [login to view URL])
3. It must build a placeholder, depending on the "Mask" parameter (it may be lilke this '(___) ___-__-__', but it is better to use spaces instead of underscore)
4. When it's initializing it must look at DefaultCountry and automatically select the appropriate code, with changes in INPUT mask, placehoder, and the code of the country added to the INPUT. The same thing happens when you select a different country code
5. If possible, make the country code unmodifiable from keyboard
6. CSS is not really important, it can be done using standard bootstrap styles
What I want to get:
1. [login to view URL] - file that describes the INPUT and calls the directive
2. [login to view URL] - file that describes all the logic of the directive
3. [login to view URL] - template for directive
Please, take a part in this task only if you have enough practical experience in Angular.js coding
The task is urgent, it must be closed in 1-2 days
Thank you for your attention!