Add a Form to the Visualforce Page

Data in Visualforce

Visualforce pages are so versatile and display data to fit your needs. The customized pages are like a fun plug-and-play web page. You can add Visualforce pages to Lightning pages as a component or replace standard pages with a custom Visualforce page as a user interface.

Let’s replace the standard record page called “New” with the new Visualforce page on the Contact object.

Replace Standard Page with Visualforce Page

In Salesforce, you override buttons, links, and even pages by overriding those properties directly in the object. You can also use Lightning Components to further customize the user experience in your Salesforce org.

  1. In your playground, click Setup Setup..
  2. From Setup, click Object Manager and select Contact.
  3. Select Buttons, Links, and Actions.
  4. For the New > NewContact standard page, click the dropdown arrow and select Edit. New contact form added to the Visualforce page.

  5. Select the override property Visualforce Page and select your new ContactForm page from the dropdown list. Visualforce page contact form override.
  6. Click Save. The standard page for adding new contacts is now replaced with your Visualforce page.

Test the New Visualforce Page

You’ve worked hard at building this new Visualforce page. It’s time to put it to the test and create a new record.

  1. From the App Launcher App Launcher., find and open Sales.
  2. Click the Contacts tab.
  3. Click New. Behold your new Visuaforce page in action! New contact Visualforce form displayed.
  4. Enter in any contact information you like.
  5. Click Save. The page will redirect you to the standard contact record.

Summary

Congratulations! You created a simple Visualforce page form to add new contacts with your new Visualforce page. You can continue to develop this page out and customize it to best fit your needs.

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities