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
eriktowneriktown 

Input boxes won't render

Hello all! I'm new to Salesforce development and trying to hit the ground running. Unfortunately I'm having a rendering problem with my first VisualForce page; the Submit button appears but none of the input boxes do. Any idea what's wrong? My code is below.

 

 

<apex:page controller="ServiceController" tabstyle="Contact">
 <apex:sectionheader title="Service" subtitle="Purchase">

     <apex:form >
     <apex:pageblock >

          <apex:pageblockbuttons >
              <apex:commandbutton action="{!submit}" value="Submit" rerender="resultsPanel" status="status">
          </apex:commandbutton></apex:pageblockbuttons>
          <apex:pagemessages >
          
          Purchase a TangoCard for a business partner today!

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="username">Username</apex:outputlabel>
                    <apex:inputtext id="username" value="{!username}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="password">Password</apex:outputlabel>
                    <apex:inputtext id="password" value="{!password}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="deliverToName">Deliver To</apex:outputlabel>
                    <apex:inputtext id="deliverToName" value="{!deliverToName}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="deliverToEmail">Email Address</apex:outputlabel>
                    <apex:inputtext id="deliverToEmail" value="{!deliverToEmail}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>
          
          <apex:actionstatus id="status" starttext="Executing...">
<apex:outputpanel id="resultsPanel">
</apex:outputpanel>
</apex:actionstatus>
</apex:pagemessages></apex:pageblock></apex:form></apex:sectionheader></apex:page>
                                        

 

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Ah, I see.  

 

Just looked at the code again, I think its your pagemessages and section header components - these are surrounding most of the content.  

 

Try changing as marked in red and deleting the components with strikethrough.

 

 

<apex:page controller="ServiceController" tabstyle="Contact">
 <apex:sectionheader title="Service" subtitle="Purchase" />

     <apex:form >
     <apex:pageblock >

          <apex:pageblockbuttons >
              <apex:commandbutton action="{!submit}" value="Submit" rerender="resultsPanel" status="status">
          </apex:commandbutton></apex:pageblockbuttons>
          <apex:pagemessages />
          
          Purchase a TangoCard for a business partner today!

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="username">Username</apex:outputlabel>
                    <apex:inputtext id="username" value="{!username}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="password">Password</apex:outputlabel>
                    <apex:inputtext id="password" value="{!password}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="deliverToName">Deliver To</apex:outputlabel>
                    <apex:inputtext id="deliverToName" value="{!deliverToName}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="deliverToEmail">Email Address</apex:outputlabel>
                    <apex:inputtext id="deliverToEmail" value="{!deliverToEmail}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>
          
          <apex:actionstatus id="status" starttext="Executing...">
<apex:outputpanel id="resultsPanel">
</apex:outputpanel>
</apex:actionstatus>
</apex:pagemessages></apex:pageblock></apex:form></apex:sectionheader></apex:page>

 

 

 

 

 

All Answers

bob_buzzardbob_buzzard

I'm assuming that you are seeing the labels, just not the actual box that you can enter the value into?  If that's the case, it may mean that you don't have permission to write to those properties.  There could be a number of other reasons though.  Can you post your controller code?

eriktowneriktown

Actually, I'm not seeing the labels either. Literally all I see is the "submit" button. Surely the controller code won't affect this?

bob_buzzardbob_buzzard

Ah, I see.  

 

Just looked at the code again, I think its your pagemessages and section header components - these are surrounding most of the content.  

 

Try changing as marked in red and deleting the components with strikethrough.

 

 

<apex:page controller="ServiceController" tabstyle="Contact">
 <apex:sectionheader title="Service" subtitle="Purchase" />

     <apex:form >
     <apex:pageblock >

          <apex:pageblockbuttons >
              <apex:commandbutton action="{!submit}" value="Submit" rerender="resultsPanel" status="status">
          </apex:commandbutton></apex:pageblockbuttons>
          <apex:pagemessages />
          
          Purchase a TangoCard for a business partner today!

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="username">Username</apex:outputlabel>
                    <apex:inputtext id="username" value="{!username}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="password">Password</apex:outputlabel>
                    <apex:inputtext id="password" value="{!password}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="deliverToName">Deliver To</apex:outputlabel>
                    <apex:inputtext id="deliverToName" value="{!deliverToName}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>

          <apex:pageblocksection >
               <apex:pageblocksectionitem >
                    <apex:outputlabel for="deliverToEmail">Email Address</apex:outputlabel>
                    <apex:inputtext id="deliverToEmail" value="{!deliverToEmail}">
               </apex:inputtext></apex:pageblocksectionitem>
          </apex:pageblocksection>
          
          <apex:actionstatus id="status" starttext="Executing...">
<apex:outputpanel id="resultsPanel">
</apex:outputpanel>
</apex:actionstatus>
</apex:pagemessages></apex:pageblock></apex:form></apex:sectionheader></apex:page>

 

 

 

 

 

This was selected as the best answer
eriktowneriktown

That did it - thank you!