Skip to main content
edited tags
Link
Sebastian Kessel
  • 13.2k
  • 12
  • 38
  • 61
Source Link

How to post form data to custom object?

My custom object is student__c. The form I've built looks the following:

<apex:page standardController="Student__c">
<apex:form>
    <apex:pageBlock title="Vnos novega študenta">
        <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="Shrani" />
        </apex:pageBlockButtons>
    </apex:pageBlock>
</apex:form>

</apex:page>

I have created a custom object with several fields, e.g. Address__c, Birth_date__c, etc.

How can I now post to this object, add new entries, to the custom object?