Submit Form in lightning component by w3web.net

How to create a form and submit on database in lightning component?

Hey guys, today in this post we are going to learn about How to create a form and submit on database in Salesforce lightning component.

We will be achieve to validate a form and submit into custom sObject in Salesforce.

We used the files in this example:-

File Name File Type Description
submitFormCustomObjectCmp.cmp Lightning Component It is hold User Interface (UI) tags and display on the browser.
submitFormCustomObjectCmpController.js JavaScript File It is used for form validation and javascript function to call a apex class method.
submitFormCustomObjectCmp.css Style CSS File For alignment and form validation input border color.
submitFormCustomObjectController.apex Apex Class Controller For create a record in database server

Custom Object:- student_info__c

Custom Object Fields:-

student_first_name__c

student_last_name__c

student_phone__c

student_email__c

 

Custom Object and their fields Custom object like database and custom fields are column of data table.

Step:-1

submitFormCustomObjectCmp.cmp [Lightning Component]

Step:-2

submitFormCustomObjectCmpController.js [JavaScript File]

Step:-3

submitFormCustomObjectCmp.css [Style CSS File]

Step:-4

submitFormCustomObjectController.apex [Apex Class Controller]

Other related post that would you like to learn…

Leave a Comment