3

I am trying to build some help text into a page layout by using a visualforce page. It is very simple (as below). However, I am receiving the error: "(under ) must occur between tags". If I delete the pageblocksection and the inputfield tags. I no longer get the error.

enter image description here

1 Answer 1

8

Your apex:inputField needs to occur between apex:form tags.

The developer console is frankly, kind of terrible, and will hide the tag names when it shows you an error message. Click on the error, and it'll render the html tag names, like below:

<apex:input> (under <apex:pageBlock>) must occur between tags <apex:form>

Also, next time you post code here, post it as text, so other users can copy that text.

3
  • Hi battery.cord, thank you! Here is the text form of the code for future reference:
    – Rebecca
    Commented Apr 5, 2018 at 14:20
  • I have added the form tags - but I am still getting an error - End tag must end with a delimiter - (which it is!): <apex:page standardController="Goal_Plan__c" tabStyle="Goal_Plan__c"> <apex:pageBlock > <apex:pageblocksection> <h1> Smart Goals </h1> <apex:form> <apex:inputField="{!Goal_Plan__c.Main_Goal__c}"></apex:inputField> <apex:inputField="{!Goal_Plan__c.Member_Feedback__c}"> </apex:inputField> </apex:form> </apex:pageblocksection> </apex:pageBlock> </apex:page>
    – Rebecca
    Commented Apr 5, 2018 at 14:28
  • You formatted your tags wrong, apex:input should look like this: <apex:inputField value="{!Goal_Plan__c.Main_Goal__c}" />. These all seem like pretty basic mistakes, you should try some of the basic trailheads to get a better grasp of the language fundamentals. Commented Apr 5, 2018 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .