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
theDreamertheDreamer 

Submit form from a website to Contact with Duplicate check

<form action="action_page.php">
  First name:<br>
  <input type="text" value="Mickey"><br>
  Last name:<br>
  <input type="text" name="lastname" value="Mouse"><br><br>
  <input type="submit" value="Submit">
</form>
I have a website with an HTML form with 2 fields on a website (example: www.abc.com/test.htm), how do i submit this data to a contact object in salesforce. It should not throw error if the record already exists in contact(salesforce).

What is the standard way to do it?

 
Shashikant SharmaShashikant Sharma
You could use Salesforce Native Rest APIs which are available.

See this: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm

Thanks
Shashikant
Jawad Rehman01Jawad Rehman01
You can also do this using inbound email method, 

http://blog.jeffdouglas.com/2010/03/12/writing-an-inbound-email-service-for-salesforce-com/

Create an inbound email function in salesforce and inbound email will give you the email address through which you will send the form details to the salesforce from php and then use regular expression to extract details from email body and subject and create contact in salesforce.

Hope this solution will solve your problem.