1( function( $, window, document, undefined ) { 2 'use strict'; 3 4 const forminator_number_format = { 5 6 run : function( event, form_id ) { 7 var _form = '#forminator-module-'+ form_id, 8 _form_el = $(_form); 9 if( 0 === _form_el.length ) return; 10 11 // Custom Phone Format = xxx-xxx-xxxx 12 if( _form_el.find('.phone .forminator-input').length ){ 13 var cleave_phone = new Cleave(_form +' .phone .forminator-input', { 14 //prefix: '+', 15 delimiters: ['-', '-'], 16 blocks: [3, 3, 4 ], 17 uppercase: true 18 }); 19 } 20 21 // Custom Number Format = x,xxx,xxx 22 if( _form_el.find('.number .forminator-input').length ){ 23 var cleave_number = new Cleave(_form +' .number .forminator-input', { 24 numeral: true, 25 numeralThousandsGroupStyle: 'thousand' 26 }); 27 } 28 29 // Format = xxx,xxx,xxx.... 30 if( _form_el.find('.currency .forminator-input').length ){ 31 var cleave_currency = new Cleave(_form +' .currency .forminator-input', { 32 prefix: '$', 33 numeral: true, 34 numeralThousandsGroupStyle: 'thousand' 35 }); 36 } 37 38 /* 39 if( _form_el.find('.credit-card .forminator-input').length ){ 40 var cleave_cc = new Cleave(_form +' .credit-card .forminator-input', { 41 creditCard: true, 42 //onCreditCardTypeChanged: function (type) { 43 // update UI ... 44 //} 45 }); 46 } 47 */ 48 49 } 50 } 51 52 $( document ).ready( function(){ 53 $( document ).on( 'after.load.forminator', forminator_number_format.run ); 54 } ); 55 56}( jQuery, window, document ) );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.