Personalização do Campo Personalizado

  • Rafael Cavalcante
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 1 month ago #95153 by Rafael Cavalcante
Personalização do Campo Personalizado was created by Rafael Cavalcante
Hello Tuan,

I'm trying to customize the fill of custom fields.

The zip cod here in Brazil is presented as follows 00000-000.

I would like to standardize the custom field padding following this stop, and users would need to fill in apneas with the numbers, without worrying about the special characters.

As it was done in the form of this link
codigofonte.uol.com.br/wp-content/upload...e-outros/mascara.htm

Note that ZIP = CEP

The CPF field is also very important, applying the same interaction with it is required.

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #95172 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Personalização do Campo Personalizado
Hello Rafael

Unfortunately, that's not supported by Events Booking. As you can see, on the page you send me, some custom code will be needed. So the idea is (if you understand the code)

1. Edit the file components/com_osmembership/view/register/tmpl/default.php, put the javascript function formatar code somewhere in that file (view source of the page you send me, you will see the code of that function)

2. Then edit the custom field, in Extra Attrubute, enter something like this OnKeyPress="formatar('##/##/####', this)"

For this, you would need someone who understand code to help you

Regards,

Tuan
The following user(s) said Thank You: Rafael Cavalcante

Please Log in or Create an account to join the conversation.

  • Rafael Cavalcante
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 1 month ago #95229 by Rafael Cavalcante
Replied by Rafael Cavalcante on topic Personalização do Campo Personalizado
Many thanks Tuan,

I did exactly as it suggested and it worked.

I pasted the php script into the file you recommended and filled in the field with the operation as suggested and worked perfectly.

Thank you!

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #95245 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Personalização do Campo Personalizado
Great. Happy to hear that it works for you :)

Tuan

Please Log in or Create an account to join the conversation.