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
salesforce@14salesforce@14 

How to make an input field as read only in VF Page.


Thanks.
Best Answer chosen by salesforce@14
Dushyant SonwarDushyant Sonwar
Hey Buddy,
use html-disabled="true" attribute in apex;inputfield.
Hope this helps.

All Answers

Dushyant SonwarDushyant Sonwar
Hey Buddy,
use html-disabled="true" attribute in apex;inputfield.
Hope this helps.
This was selected as the best answer
Dushyant SonwarDushyant Sonwar
You can also Use html-readonly="true" in apex:inputtext to achieve your output.
salesforceapexsalesforceapex
I have a similar situation for a inputField. I'm trying to use the html-disabled={!booleanvariable};
Whereas the "booleanvariable" is from the custom controller used in this VF page. Even though the value from the custom controller for the booleanvariable is false it still disable the inputField.

What are the possible values for the html-disabled while using as passthrough variable.

Any help would be highly appreciated.