Inside a pageBlock
with mode="edit"
, I'd like to show a required inputField
with the type set to "password" instead of "text". When I use inputSecret
, even with required="true", it doesn't show the red bar indicating that the field is required.
I've been able to do it with a lot of tags, but I'm thinking that there must be an easier way.
<!-- Extra markup to get the red required line on
inputSecret instead of inputField -->
<apex:pageBlockSectionItem >
<apex:outputLabel value="Password" />
<apex:outputPanel styleClass="requiredInput" layout="block">
<apex:outputPanel styleClass="requiredBlock" layout="block" />
<apex:inputSecret value="{!MyObject__c.Password__c}"
required="true" />
</apex:outputPanel>
</apex:pageBlockSectionItem>
Is this actually a bug (that inputSecret doesn't show the red bar)?