I am trying to make a field required on condition in vf page as below. But the red color bar is not appearing. How to make the red bar appear.
<apex:inputtext value="{!b.Quantity__c}" required="{!IF(b.Service__c!=' ',true,false)}"/>
Regards
I am trying to make a field required on condition in vf page as below. But the red color bar is not appearing. How to make the red bar appear.
<apex:inputtext value="{!b.Quantity__c}" required="{!IF(b.Service__c!=' ',true,false)}"/>
Regards
Best Answer
Try with
apex:inputField
and use conditionally required attributeOR If you still want to go with
apex:inputText
and want to show red mark then use below code based on required hide/show field