function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike ArthurMike Arthur 

How to control the number of decimal places displayed when apex:inputField is pre-populated

My Visualforce Opportunity Product selection page has an apex:inputField tag to capture the Quantity.

The value is preset to 1 as a default.

The data type of the standard field Quantity is Number(10, 2).

When the page displays to enter a new Opportunity Product, the quantity is displayed as 1.00.

How can I make it display as 1 with no decimal?

Thanks,
Mike.
Mike ArthurMike Arthur
Hi Piyush,

Thank you for answering, however it doesn't do what I need.

I received a solution that solved my problem over on Stack Exchange:
http://salesforce.stackexchange.com/questions/148945/how-to-format-a-visualforce-inputfield

Thanks,
Mike.