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
dhruv mehta 15dhruv mehta 15 

Inputting Data Using Forms challenge

<apex:page standardController="contact">
    <apex:form>
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection Columns="1" >
                <apex:inputField value="{! Contact.FirstName}"/>
                <apex:inputField value="{! Contact.LastName}"/>
                <apex:inputField value="{! Contact.Email}"/>
            </apex:pageBlockSection>

            <apex:pageButtons>
                <apex:commandButton action"{!Save} value="Save"/>
</apex:pageButtons>apex:pageBlockButtons>
                                 
</apex:pageButtons>apex:pageBlock>
</apex:form>
</apex:page>


this is the code i had written but its got some error.error msg
Best Answer chosen by dhruv mehta 15
Onesh ReddyOnesh Reddy
Hi Mehta,

Your Code is almost correct except the Commandbutton Action.
Find below the updated code.
<apex:page standardController="contact">
    <apex:form>
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection Columns="1" >
                <apex:inputField value="{! Contact.FirstName}"/>
                <apex:inputField value="{! Contact.LastName}"/>
                <apex:inputField value="{! Contact.Email}"/>
            </apex:pageBlockSection>
           <apex:pageBlockButtons>
           <apex:commandButton action="{!Save}" Value="Save"/>
                </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Mark this Best Answer if it helps you.
Best Regards,
Onesh.K

All Answers

Onesh ReddyOnesh Reddy
Hi Mehta,

Your Code is almost correct except the Commandbutton Action.
Find below the updated code.
<apex:page standardController="contact">
    <apex:form>
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection Columns="1" >
                <apex:inputField value="{! Contact.FirstName}"/>
                <apex:inputField value="{! Contact.LastName}"/>
                <apex:inputField value="{! Contact.Email}"/>
            </apex:pageBlockSection>
           <apex:pageBlockButtons>
           <apex:commandButton action="{!Save}" Value="Save"/>
                </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Mark this Best Answer if it helps you.
Best Regards,
Onesh.K
This was selected as the best answer
dhruv mehta 15dhruv mehta 15
Thanks Onesh, that was spot on.