Contents[Hide]

Add reqired red bar to input text

Standard apex:inputTextarea even when you set required="TRUE" will not display red required bar.
Workaround for this problem is to wrap apex:inputTextarea in apex:outputPanel.


<apex:outputLabel value="Comment (required):" for="Comment" />
<apex:outputPanel styleClass="requiredInput" layout="block">
    <apex:outputPanel styleClass="requiredBlock" layout="block"/>
    <apex:inputTextarea id="Comment" value="{!CommentText}" required="TRUE" cols="80" rows="8"/>
</apex:outputPanel>

Source: SF Board

.

   
© Paweł Woźniak