You need to sign in to do that
Don't have an account?

How would I create a visualforce page that is a form that save form fields into a custom object?
Hi,
I have a custom object called customObj__c. I need to create a visualforce page that looks like this:
First Name : <textbox input>
Last Name : <textbox input>
Email: <textbox input>
<submitButton Here>
When the Submit button is pressed, i need to simply create a new customObj__c record using the values entered in the form (first name, last name, email). How to do I accomplish this? I am confused as to how I can use a class to save the new record on Submit button click.
I have a custom object called customObj__c. I need to create a visualforce page that looks like this:
First Name : <textbox input>
Last Name : <textbox input>
Email: <textbox input>
<submitButton Here>
When the Submit button is pressed, i need to simply create a new customObj__c record using the values entered in the form (first name, last name, email). How to do I accomplish this? I am confused as to how I can use a class to save the new record on Submit button click.
Here is a good example of a VF page and a controller:
http://www.salesforce.com/docs/developer/pages/Content/pages_controller_custom.htm
But if you have a custom object with some fields, you can use the starndard page layout and the starndard edit page to save this information, there is not need to add custom code if you just want to save some basic data, usually a visual force page + controller its when you have a custom page with some expecial requeriments.
Here is a video (kind of old but its shows the basic) about how to create a custom object and use the pagelayout to insert data:
https://www.youtube.com/watch?v=uD5t8rCvqlE
I hope this helps.