Generate a correct, ready-to-paste Salesforce Web-to-Lead or Web-to-Case HTML form — the right endpoint, hidden fields, standard & custom fields and GDPR consent.
Setup → Company Information → Salesforce.com Organization ID.
<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST" class="sf-form">
<input type="hidden" name="oid" value="YOUR_ORG_ID" />
<!-- Remove the next line before going live -->
<input type="hidden" name="debug" value="0" />
<div class="sf-row">
<label for="first_name" class="sf-label">First Name</label>
<input id="first_name" name="first_name" type="text" class="sf-input" />
</div>
<div class="sf-row">
<label for="last_name" class="sf-label">Last Name</label>
<input id="last_name" name="last_name" type="text" required class="sf-input" />
</div>
<div class="sf-row">
<label for="email" class="sf-label">Email</label>
<input id="email" name="email" type="email" required class="sf-input" />
</div>
<div class="sf-row">
<label for="company" class="sf-label">Company</label>
<input id="company" name="company" type="text" class="sf-input" />
</div>
<div class="sf-row">
<label for="phone" class="sf-label">Phone</label>
<input id="phone" name="phone" type="tel" class="sf-input" />
</div>
<div class="sf-consent">
<label><input type="checkbox" required /> I consent to my data being processed in line with the privacy policy.</label>
</div>
<button type="submit" class="sf-submit">Submit</button>
</form>
<style>
.sf-form{max-width:520px;font-family:system-ui,sans-serif}
.sf-row{margin-bottom:14px;display:flex;flex-direction:column}
.sf-label{font-size:13px;font-weight:600;margin-bottom:6px}
.sf-input{padding:10px 12px;border:1px solid #ccc;border-radius:8px;font-size:14px}
.sf-consent{font-size:13px;margin:10px 0 16px}
.sf-submit{background:#0176d3;color:#fff;border:0;border-radius:8px;padding:11px 22px;font-weight:600;cursor:pointer}
</style>Set debug=0 only while testing, then remove it. Custom fields use the Salesforce field ID (starts 00N). Always confirm against your org’s Web-to-Lead/Case setup.
Web-to-Lead is the easy bit. JW Digital builds robust Salesforce integrations — two-way sync, custom objects, APIs and middleware — having delivered them for Salesforce clients.