Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apostrophecms-legacy/apostrophe-forms-phone-field-widgets
This module adds a phone number field supporting full validation of international phone number formats. It is meant for use alongside the apostrophe-forms module.
https://github.com/apostrophecms-legacy/apostrophe-forms-phone-field-widgets
Last synced: 1 day ago
JSON representation
This module adds a phone number field supporting full validation of international phone number formats. It is meant for use alongside the apostrophe-forms module.
- Host: GitHub
- URL: https://github.com/apostrophecms-legacy/apostrophe-forms-phone-field-widgets
- Owner: apostrophecms-legacy
- Created: 2020-06-11T19:51:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T19:45:09.000Z (over 4 years ago)
- Last Synced: 2024-12-07T00:12:55.007Z (21 days ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This module adds a phone number field supporting full validation of international phone number formats. It is meant for use alongside the `apostrophe-forms` module.
When using it, you must configure the `formWidgets` option to `apostrophe-forms` to include it, as well as all other form widgets you wish to use. See the `apostrophe-forms` documentation.
## Configuration
```javascript
// in app.js
modules: {
'apostrophe-forms': {
formWidgets: {
// other fields go here
'apostrophe-forms-phone-field': {}
}
},
'apostrophe-forms-phone-field-widgets'
}
```The user will be prompted to select a country and the country code will be automatically supplied when they do. The user may also skip that step and enter their own country code. If the phone number is supplied without a country code the user is required to provide it.