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
Samuel JohnsonCBESamuel JohnsonCBE 

Tabs in visualforce

I have built a simple tab structure for the opportunity page.  I am using a custom field, it is not showing the name of the field before the picklist value.  Also I was wondering is there a way to have the save button act just like the standard save button that just shows that field not the box where I can add text of pick some thing. 

<apex:page standardController="Opportunity" sidebar="false" showHeader="false">
<apex:tabPanel switchType="client" selectedTab="tabdetails"
id="OpportunityTabPanel" tabClass="activeTab"
inactiveTabClass="inactiveTab">
      <apex:tab label="Onboarding"> 
          <apex:form >
               <center><apex:commandButton action="{!Save}" value="Save"/></center><br></br> <br></br>
                    <apex:inputField value="{!opportunity.Growth_Enhancement_Track__c}"/>
          </apex:form>
     </apex:tab>
          <apex:tab label="Analysis">
     </apex:tab>
           <apex:tab label="Follow-up">
      </apex:tab>
  </apex:tabPanel>
</apex:page>

This is what it looks like also after I hit save.

User-added image
This is what I would like it to look like after I hit save. Fields are just an example

User-added image
 
JitendraJitendra
You would basically need to use "PageBlockTable" and "PageBlockSection".
Check this example -
 
<apex:page standardController="Opportunity" sidebar="false" showHeader="false">
<apex:tabPanel switchType="client" selectedTab="tabdetails"
id="OpportunityTabPanel" tabClass="activeTab"
inactiveTabClass="inactiveTab">
      <apex:tab label="Onboarding"> 
          <apex:form >
               <apex:pageBlock  title="Save">
                   <center>
                       <apex:commandButton action="{!Save}" value="Save"/>
                  </center> 
                   	<apex:pageBlockSection> 
                  		<apex:inputField value="{!opportunity.Name}"/>
                    </apex:pageBlockSection>
              </apex:pageBlock>
          </apex:form>
     </apex:tab>
          <apex:tab label="Analysis">
     </apex:tab>
           <apex:tab label="Follow-up">
      </apex:tab>
  </apex:tabPanel>
</apex:page>

 
Samuel JohnsonCBESamuel JohnsonCBE
That seemed to work for the first part.  Now my other issue is when I hit the save button it redirects me to the opportunity page on the visualforce sections.  I would like it to take me back to my tab with the fields.  Any thoughts. 
Samuel JohnsonCBESamuel JohnsonCBE
This is where it is taking me.  User-added image

I want to be here. User-added image