Skip to main content
Roman Altshuler (NA) a posé une question dans #Visualforce
Hello, looking for a way to change a text input field on a Visualforce page to be displayed as an output field after something is entered in that field and save button is pressed. Or generally a way to make the field read-only once it is not null. Hoping to avoid using a controller. Any help much appreciated.
1 réponse
  1. 5 avr. 2016, 12:27

    You can achieve this functionality using 

    <apex:inputField value="{!account.name}" rendered="{!If(account.name=null, true, false)}"/>

    <apex:outputField value="{!account.name}" rendered="{!If(account.name!=null, true, false)}"/>

0/9000