Visualforce Apex:form Tag

Visualforce Apex:form Tag : In our previous Salesforce Tutorial we have learned about visualforce <apex:page> tag . In this Salesforce Training Tutorial we are going to learn about <apex:form> tag.

<apex:form> :- apex:form tag is used in visualforce page to add submit forms, input values from the user and so on. We can use many apex:form tags in a visualforce but using only one  apex:form tag in a visualforce page is recommended. When <apex:form> is used in VF page and should be ended with </apex:form>.

Different attributes supported by <apex:form> tag.

accept   acceptcharset dir     enctype
onkeydown onkeyuponmousedownonmouseout
onmouseover  onmouseup     onresetonsubmit

Let us check how <apex:form> tag works.

Visualforce Apex:form Tag

  • <apex:form> form is added after <apex:page> tag and should be closed with</apex:form> tag.
  • Between these tags all other tags are added like pageblock, pageblocksection, inputfield and so on.

apex:form tag Output.

Visualforce Apex:form Tag