Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have one pageblocksection.enter image description here

i want to remove Required information displaying on right hand side. Thanks.

<apex:pageBlockSection columns="2" title="Personal Data">
   <apex:pageBlockSection columns="1">
    <apex:repeat value="{!Info}" var="application">
      <apex:repeat value="{!Fields}" var="app">
    <apex:inputField  value="{!application[app.fieldPath]}" required="      {!OR(app.required, app.dbrequired)}"/>
share|improve this question
Can you please share your code of Visualforce? – Mohith Shrivastava Feb 20 '13 at 11:24
up vote 3 down vote accepted

You can do what @techtrekker was getting at by putting an id on the pageBlockSection and then changing the jQuery selector to use that in conjunction with the requiredLegend class (see below). However, anytime you rely on behind the scenes CSS you risk that SF will change it at some point making your page break. You might want to push back on the requirement a little with an explanation that the required information text is standard functionality.

<script src="//"></script>

<script type="text/javascript">
   var $j = jQuery.noConflict();
   $j(document).ready(function() {
       // note that there is a space before the .requiredLegend
       $j('[id$="myBlock"] .requiredLegend').hide();

<apex:pageBlockSection columns="2" title="Personal Data" id="myBlock">
share|improve this answer
thanks @peter knolle – Pankaj Feb 20 '13 at 12:04

If you're referring to the the text that appears on a standard page layout, from View Source, it is a span with class=requiredText

You can hide it using jQuery


This would hide all elements where the class was requiredText

share|improve this answer
but i want to do this only on 1 pageblock i want the same. – Pankaj Feb 20 '13 at 11:33
If its the first occurrence, you can use the first jQuery selector – techtrekker Feb 20 '13 at 11:56
thanks techtrekker – Pankaj Feb 20 '13 at 12:02

This is actually a much easier without any javascript code if you just change the mode parameter of apex:pageBlock from edit to detail, and then sets collapsible="false" for the pageBlockSection:

<apex:pageBlock mode="detail" tabStyle="account">
    <apex:pageBlockSection columns="2" title="Personal Data" collapsible="false">

With mode="edit" :

enter image description here

And with mode="detail" :

enter image description here

share|improve this answer
That is much better if the whole page or pageBlock is using it and it is acceptable for an edit page to be styled like a detail page, but I think in this case he just wanted one of the pageBlockSections to change. – Peter Knolle Feb 20 '13 at 12:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.