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
divakar u 9divakar u 9 

Create a Visualforce page using SLDS to take inputs, and a Button to save the value as a contact. Include all required fields to save the contact.

Raj VakatiRaj Vakati
Use this code 

and add any required fields are there 
 
<apex:page showHeader="false" sidebar="false" standardStylesheets="true"
           standardController="Contact" applyHTmlTag="false">
    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <head>
            <apex:slds />
        </head>
        <body class="slds-scope">
            
            
            <apex:form >
                <div class="slds-grid slds-wrap">
                    <div class="slds-p-horizontal--small slds-size--1-of-1 slds-m-top--large">
                        <h3 class="slds-text-heading--small slds-m-bottom--medium">Contact Information</h3>
                    </div>
                    <div class="slds-p-horizontal--small slds-size--1-of-2">
                        <div class="slds-form-element slds-hint-parent">
                            <span class="slds-form-element__label">First Name</span>
                            <div class="slds-form-element__control">
                                <apex:inputField styleClass="slds-input" value="{!Contact.FirstName}"/>
                            </div>
                        </div>
                    </div>
                    <div class="slds-p-horizontal--small slds-size--1-of-2">
                        <div class="slds-form-element slds-hint-parent">
                            <span class="slds-form-element__label"><abbr class="slds-required" title="required">*</abbr>Last Name</span>
                            <div class="slds-form-element__control">
                                <apex:inputField styleClass="slds-input" value="{!Contact.LastName}"/>
                            </div>
                        </div>
                    </div>
                    
                    <div class="slds-p-horizontal--small slds-m-top--medium slds-size--1-of-1 slds-align--absolute-center">
                        <apex:commandButton styleClass="slds-button slds-button--neutral" value="Cancel" action="{!cancel}" />
                        <apex:commandButton styleClass="slds-button slds-button--brand" value="Save" action="{!save}" />
                    </div>
                </div>
            </apex:form>
        </body>
    </html>
</apex:page>

 
divakar u 9divakar u 9
thanks ram
divakar u 9divakar u 9
contact saved but its not in contact list . wts the problem
divakar u 9divakar u 9
wants to create apex class"?
 
Raj VakatiRaj Vakati
what do you mean by contact list ? you can able to save in the contact and you no need to create an apex class