You need to sign in to do that
Don't have an account?
SF7
Not Allow Decimals
Hi All
I have some input fileds in vf page where i can eneter values and i do not want users able to enetr decimals(us locale) or cammas( ,)[france locale) how can i do it
i tried to change the filed decimal length to zero and then user is able to enetr and upon saving it deletes
but i do not want the user to enter at all
<apex:inputField value="{!wrapper.ocr.Total_Client_Spend__c}" required="true" />
<apex:inputField id="UnitPrice" value="{!wrapper.ocr.UnitPrice}" required="true"/>
This may be one of the solution :
Thanks,
Shailesh Patil
PS: Tested working
All Answers
How about using an apex:Actionsupport tag to tie an event like on change to a javascript code? Then that javascript code could remove the decmial for you or alert the user.
This may be one of the solution :
Thanks,
Shailesh Patil
PS: Tested working
I used java Script as you said it worked and i added charChode != 46 for decimals and it worked .
Can you tell me in the java script what are the numbers which represent letters, because i need to give access to letters like K and M for thoushands and millions and B for Billions.