You need to sign in to do that
Don't have an account?
Frank Timmons
Trying to create a 3 column section on the Account object
I'm not a coder so I searched for how to accomplish getting a section to have 3 (or more) columns and I did find something but the code isn't working. Can someone help?
<apex:page>
<apex:pageBlockSection title="Labor Breakdown" columns="3">
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Estimate1</apex:outputLabel>
<apex:inputField value="{!obj__c.Estimate__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Hours1</apex:outputLabel>
<apex:inputField value="{!obj__c.Hours__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Rate1</apex:outputLabel>
<apex:inputField value="{!obj__c.Rate__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:page>
<apex:page>
<apex:pageBlockSection title="Labor Breakdown" columns="3">
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Estimate1</apex:outputLabel>
<apex:inputField value="{!obj__c.Estimate__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Hours1</apex:outputLabel>
<apex:inputField value="{!obj__c.Hours__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Rate1</apex:outputLabel>
<apex:inputField value="{!obj__c.Rate__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:page>
https://help.salesforce.com/apex/HTViewSolution?id=000005105&language=en_US
You should use inputtext to capture a value whihc doesn't correspond to a field value in SF:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_inputText.htm?search_text=inputtext
All Answers
Error: <apex:inputField> (under <apex:page>) must occur between <apex:form></apex:form> tags.
<apex:page>
<apex:form>
<apex:pageBlockSection title="Labor Breakdown" columns="3">
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Estimate1</apex:outputLabel>
<apex:inputField value="{!obj__c.Estimate__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Hours1</apex:outputLabel>
<apex:inputField value="{!obj__c.Hours__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" >
<apex:outputLabel >Rate1</apex:outputLabel>
<apex:inputField value="{!obj__c.Rate__c}" style="width:80px"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:form>
</apex:page>
https://help.salesforce.com/apex/HTViewSolution?id=000005105&language=en_US
You should use inputtext to capture a value whihc doesn't correspond to a field value in SF:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_inputText.htm?search_text=inputtext
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock title="District Modules">
<apex:pageBlockSection title="My Section" columns="3" collapsible="true">
<apex:outputField value="{!Account.moduleActive_504__c}"/>
<apex:outputField value="{!Account.modulePO_504__c}"/>
<apex:outputField value="{!Account.moduleActive_Cafeteria__c}"/>
<apex:outputField value="{!Account.modulePO_Cafeteria__c}"/>
<apex:outputField value="{!Account.moduleActive_Gradebook__c}"/>
<apex:outputField value="{!Account.modulePO_Gradebook__c}"/>
<apex:outputField value="{!Account.moduleActive_IRS__c}"/>
<apex:outputField value="{!Account.modulePO_IRS__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>