International phone input for autoform package. @See Bluefieldscom/intl-tel-input jQuery plugin.
meteor add smaltcreation:autoform-intl-tel-input
In your SimpleSchema
object, autoform
has to be type of 'intl-tel'
:
phone: {
type: String,
autoform: {
type: 'intl-tel',
class: 'form-control',
intlTelOptions: {
autoFormat: true,
defaultCountry: 'FR',
utilsScript: '/packages/smaltcreation_autoform-intl-tel-input/.npm/package/node_modules/intl-tel-input/build/js/utils.js'
}
}
}
- type:
'intl-tel'
- class:
'form-control'
- intlTelOptions: @See intl-tel-input options
If you want the vertical-form
style of bootstrap, add in your .css
file:
.intl-tel-input {
width: 100%;
}