+ Start a Discussion
chokchok 

How to set Red Bar on Mandatory field for "Name" Field in Visual Force Input Field form.

hi

i want to put red line symbol for mandatory field on vf page

can any one help please

Best Answer chosen by Admin (Salesforce Developers) 
chokchok

First Name <span style="color:red;">|</span> <apex:inputText value="{!first}" required="true"/>

All Answers

Bhawani SharmaBhawani Sharma

use following:

<apex:inputField value="{!Account.Name}" required="true"/>

chokchok

thanks for ur reply i did same thing previously but im not getting red bar

Bhawani SharmaBhawani Sharma
<div class="labelCol requiredInput">
<span class="requiredMark"/>
<apex:inputField value="{!Account.Name}" />
</div>
chokchok

First Name <span style="color:red;">|</span> <apex:inputText value="{!first}" required="true"/>

This was selected as the best answer