Visualforce page tag – apex:form

apex:form

apex:form, it is a section of visualforce page that allows users to enter input and then submit it with command button or link.




It is a best practice to use only one apex:form tag in a page or custom component.  

Example:

<apex:page standardController=”Account”>   

    <h1>Update Account Details</h1>   

    <apex:form>   

        <apex:inputField value=”{! Account.Name }”/>       

        <apex:commandButton action=”{! save }” value=”Save” />   

    </apex:form>   

</apex:page> 

apex:form attributes:

accept, acceptcharset, dir, enctype, forceSSL, id, lang, onClick, ondblclick, onkeydown, onkeypress,  onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onreset, onsubmit, prependId, rendered, style, styleClass, target, title.

Refer this for more details https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_form.htm




Thank you for visiting this tutorial website!! We will review your comment and getback to you shotly.