Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Field Management - lastname in CAPS only

  • tmoran
  • tmoran
  • OFFLINE
  • Posts: 166
  • Thanks: 12
  • Karma: 1
9 years 3 months ago - 9 years 3 months ago #267042 by tmoran
Is it possible to force a text field to be entered/displayed all in caps? I have a client wanting all user last names to be entered and displayed in caps only - to stay in line with their existing databases.
Last edit: 9 years 3 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
9 years 3 months ago #267083 by krileon
Replied by krileon on topic Field Management - lastname in CAPS only
Yes, edit the username field and under Parameters > Validation set "Authorized input" to "Custom PERL regular expression". Now you can supply a custom REGEXP validation rule in "Perl Regular Expression". For example the below would validate capital letters and digits only.

/^[A-Z0-9]+$/

Another option is to covert it to uppercase using CB Auto Actions on the after registration trigger using a field action and format functions. Example as follows.

Global
Trigger: After User Registration
Type: Field
User: Automatic
Access: Everybody
Action
Field: Username
Operator: Set
Value: [cb:parse function="convert" method="uppercase"][username][/cb:parse]
Parameters
Format Functions: Yes

Another option is to covert it for display purposes only using CSS.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • tmoran
  • tmoran
  • OFFLINE
  • Posts: 166
  • Thanks: 12
  • Karma: 1
9 years 3 months ago #267133 by tmoran
Replied by tmoran on topic Field Management - lastname in CAPS only
Thanks Kyle :)

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

Moderators: beatnantkrileon
Powered by Kunena Forum