If i try to add code in functions.php
function talisman_custom_masks_form_fields() {
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$("input.tel-new").mff_mask('+380__ ___-__-__');
});
</script>
<?php
}
add_action('wp_footer', 'talisman_custom_masks_form_fields', 111);
<div class="twr_form_box">
[tel* tel-706 class:form-control class:tel-new size:16 placeholder "+380__ ___-__-__" ]
</div>
it doesn’t work too.
Hi @mirazhyk
Try using the code below.
jQuery('input.tel-new').mff_mask('+38(X00) 000-00-00', {
translation: { 'X': { pattern: /[0]/, optional: false, fallback: '0'}},
placeholder: "+38(0__) ___-__-__"
});
form field code
<div class="twr_form_box">
[tel* tel-706 class:form-control class:tel-new size:16]
<div>
in functions.php
function talisman_custom_masks_form_fields() {
?>
<script type="text/javascript">
jQuery('input.tel-new').mff_mask('+38(X00) 000-00-00', {
translation: { 'X': { pattern: /[0]/, optional: false, fallback: '0'}},
placeholder: "+38(0__) ___-__-__"
});
</script>
<?php
}
add_action('wp_footer', 'talisman_custom_masks_form_fields', 111);
https://prnt.sc/t4GS57nRD5KN doesn’t work
Hi @mirazhyk
The test conducted directly on the website link provided initially worked correctly.
Can you provide more details about why it didn’t work for you?
I think it looks another)))
I’m wrong, I’m sorry.
Thank You)
5 stars from me)))