Skip Navigation

[Resolved] Language on toolset form fields

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)

This topic contains 1 reply, has 1 voice.

Last updated by Minesh 1 week, 6 days ago.

Assisted by: Minesh.

Author
Posts
#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

Languages: English (English )

Timezone: 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:
- hidden link

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)');
  
});