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
kk_Newbeekk_Newbee 

Can a field be made Required/not Required on a visualforce page , based on some conditions?

Val ValinoVal Valino

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

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

 

^^^^ Include two different inputfields, render one or the other based on condition.