You need to sign in to do that
Don't have an account?
Kevinsan
Don't want to display the increase/decrease bar in InputField with type="number"
I don't want to display the increase/decrease bar(the red square in the image) in InputField with type="number"
<apex:page showHeader="false" standardController="Account" docType="html-5.0"> <apex:form > <apex:pageBlock title="Test InputField"> <apex:inputField value="{! Account.Name }"/><br/> <apex:inputField type="number" value="{! Account.NumberOfEmployees }"/> </apex:pageBlock> </apex:form> </apex:page>
All Answers
you can try the below code.
<apex:page showHeader="false" standardController="Account" docType="html-5.0">
<apex:form >
<apex:pageBlock title="Test InputField">
<apex:inputField value="{! Account.Name }"/><br/>
<apex:inputField type="number" value="{!Account.NumberOfEmployees }"/>
</apex:pageBlock>
</apex:form>
<style>
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>
</apex:page>
And I have another question. How can I limit the input with only 2 numbers?