Sauter la navigation

[Résolu] Language on toolset form fields

This support ticket is created Il y a 3 mois et 3 semaines. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 réponse, a 1 voix.

Dernière mise à jour par Minesh Il y a 3 mois et 3 semaines.

Assisté par: Minesh.

Auteur
Publications
#2791420

Hi I have created a registration form using toolset user form and I want the fields to accept only english letters. Can you please advise how can I do it?

#2791463

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you will require to add custom JS code in order to only allow the English letters.

Here is the link that may help you:
- lien caché

For example, you have registration form and you want to restrict the user_login field to only allow the English letters. The following code you should add to your Toolset User form's JS editor:

jQuery(document).ready(function($){
  
  $('input[name="user_login"]').attr('onkeydown','return /[a-zA-Z]/i.test(event.key)');
  
});