Capitalise one specific field

Hello,

I want to capitalize only one field through the client script. Like the field in lead doctype, Job title whenever anyone writes any value in it, it must be capitalized by default.

Screenshot from 2022-11-14 11-31-22

Thanks in advance!!

1 Like

you can write a server script - “before insert event”
The strip also applied to any gap and you can ignore if you do not want script

example

if doc.first_name is not None:
    doc.first_name = doc.first_name.strip()
    doc.first_name = doc.first_name.upper()
1 Like