Salesforce - Using Forms


Advertisements

Salesforce is a data-driven platform. So viewing and editing data in its apps is a fundamental requirement. Like the traditional HTML forms, we can create similar forms in Saleforce for editing the data in Salesforce.

Creating Input Form

The Input forms are created using a Visualforce page. We open a new Visualforce page by using the path Developer Console → File → New → Visualforce Page. We write the code as shown below which uses Contact as the standard controller and the purpose is to edit the values in the 3 fields - Name, Email and Phone.

visulaforce forms code 1

Upon running the above code for the visualforce page, we get the following output..

visulaforce forms result 1

But we can improve the above form further by aligning the fields to one column and putting all the input fields and labels into a block. The code given below shows how we add a section and block to the form and also put the fields in one column.

visulaforce forms code 2

Upon running the above code for the Visualforce page, we receive the following output.

visulaforce forms result 2

Useful Video Courses


Video

Salesforce Online Training

49 Lectures 3.5 hours

Manigandan Jagadeesan

Video

Salesforce Certified Administration

113 Lectures 13 hours

Eduonix Learning Solutions

Video

A Practical Guide To SFDX and Salesforce CLI

37 Lectures 3 hours

Manish Choudhari

Video

Cloud Computing with SALESFORCE HEROKU

22 Lectures 4.5 hours

Pranjal Srivastava

Video

Salesforce Report and Dashboard

43 Lectures 7 hours

Debasis Jena

Video

Salesforce Lightning Components Development Tutorial

54 Lectures 8 hours

SYED CHAND SHAH

Advertisements