> For the complete documentation index, see [llms.txt](https://helpwith.salesorder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpwith.salesorder.com/setup/web-to-lead.md).

# Web to Lead

Originally this function was designed to capture Leads from a web page. We’ve enhanced this to enable you to create a Prospect or a Customer from the form.

### Setup

Go to <mark style="color:orange;">Setup > Configuration</mark>.&#x20;

Under the General section choose 'Generate Web Forms'.&#x20;

Choose whether the submission of the form creates a Lead, Prospect or Customer.&#x20;

Enter success and failure URLs (which would normally be a page on your website) and a couple of other fields such as Campaign and Source.&#x20;

Click on 'Generate Form', an example HTML form is created in the area below.&#x20;

Test.&#x20;

Copy and paste the HTML into the target page(s).&#x20;

Style.

### Field names:

First Name = "fname"&#x20;

Last Name = "lname"&#x20;

Gender = "gender"&#x20;

First line of address = "addr1"&#x20;

Second line of address = "addr2"&#x20;

City = "city"&#x20;

Country = "country"&#x20;

State = "state"&#x20;

Postcode = "postcode"&#x20;

Phone 1 = "phone1"&#x20;

Phone 2 = "phone2"&#x20;

Fax Number = "fax"&#x20;

Mobile Number = "mobile"&#x20;

Website = "website"&#x20;

Email = "email"&#x20;

Company Name = "companyname"&#x20;

Campaign = "campaign"&#x20;

Female = "f"&#x20;

Male = "m"&#x20;

Description = "description"&#x20;

Notes = "notes"&#x20;

Status = "status"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpwith.salesorder.com/setup/web-to-lead.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
