Deepakmahajan
Deepakmahajan

Reputation: 866

Convert text to upper case in salesforce

I have one custom object field name Flight_Request_c.Fields.From_c where Flight_Request is a custom object and From__c is a text field

how it possible that when user type in from field it changes to Upper case

Please help me..

Upvotes: 1

Views: 6441

Answers (2)

PartOfTheOhana
PartOfTheOhana

Reputation: 685

You should be able to use workflows and field updates to change the case to UPPER

Workflow -> field update -> select obj, thien field. Choose formula and your formula = UPPER() then activate it.

Upvotes: 1

Matt K
Matt K

Reputation: 7337

Use JavaScript on the onkeyup attribute.

<apex:inputtext value="{!Widget__c.Name}" onkeyup="var u=this.value.toUpperCase();if(this.value!=u){this.value=u;}" />

This will work on <apex:inputfield> components as well as <apex:inputtext>, if the inputfield contains a Visualforce field that accepts text.

Upvotes: 0

Related Questions