0
I have a system in Cakephp 3.4.5 and am using jquery to apply a mask to the cep, Cpf, cnpj and etc.
How do I save the data without the mask?
I call Jquery in my default.ctp which is in my layout folder.
echo $this->Html->script('jquery.maskedinput.min');
I also put the information mask cobnforme code below.
echo $this->Html->scriptBlock('jQuery(function($){ $("#cpf").mask("999.999.999-99"); });', array('inline' => false));
echo $this->Html->scriptBlock('jQuery(function($){ $("#cep").mask("99999-999"); });', array('inline' => false));
Grateful
When submitting your form gives an replace, no?
– Aline
How should I do it, @Aline?
– fabricio_wm
Take a look: https://www.w3schools.com/php/func_string_str_replace.asp
– Aline
I’m sorry, but I don’t know how to apply this. ?
– fabricio_wm
Sorry it took so long. but it’s like Bruno explained to you. (=
– Aline