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
B TulasiB Tulasi 

How to hide the Required field symbol in visualforce page

Hi All,

 I need Required input field in visual force. I given as Required = "true".
    <apex:inputField value="{!reg.Confirm_Password__c}" style="margin-left:-400px;" required="true"/>

It's working. But i don't want " | " this symbol as red mark. I want Star symbol as red color. Here, i am using <sup Style="color:Red">*</sup> tag for Star symbol. How to hide the " | " symbol.

Thanks in advance
Thulasi
sandy sfdcsandy sfdc
hi tulasi

Make Required="false"

And before inputfield tag use this.

<span style="Color:red;font-size: 150%">*</span>
B TulasiB Tulasi
Hi Sandy,
Thanks for ur reply,

My problem is, i am using inputFields in table format. I set all fields in one format. finally,  i given requred to one field. But, the red mark is not showing beside the inputfield. it is showing some outside.
sandy sfdcsandy sfdc
Put the particular field like this 

  <apex:pageBlockSectionItem id="pbsi13">
    <apex:outputText value="Website"  /> 
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <span style="Color:red;font-size: 150%">*</span>
  <apex:inputField value="{!Account.Website}" label="Website" required="false" />
   </apex:outputPanel>
</apex:pageBlockSectionItem>
sandy sfdcsandy sfdc
For example:
 
<apex:page standardController="Account">
  <apex:form >
  <apex:pageBlock >
  <apex:pageBlockSection >
  <apex:inputField value="{!Account.Name}" label="Name" required="false"/>
 <apex:inputField value="{!Account.Phone}" label="Phone" required="false"/>
  <apex:inputField value="{!Account.Industry}" label="Industry" required="true"/>
    <apex:pageBlockSectionItem id="pbsi13">
    <apex:outputText value="Website"  /> 
     <apex:outputPanel >
   <span style="Color:red;font-size: 150%">*</span>
  <apex:inputField value="{!Account.Website}"  />
   </apex:outputPanel>
</apex:pageBlockSectionItem>
   </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>

screenshot:
User-added image
sandy sfdcsandy sfdc
But to fire validatation message u need to write Javascript rule to show alert message(field is mandatory).