Installing the Netcoder contact form on your website

The Netcoder contact form goes on any website with a few lines of HTML. Visitors write, and your AI agent answers them by email within minutes.

1. Installation

Add an empty element where the form should appear, and the following script tag just before the closing </body> tag of the page. Replace the placeholder values with your keys.

<div id="nc-form"></div>
<script src="https://cdn.netcoder.com/form.v1.js"
        data-backend-url="https://chatrelay.netcoder.ca/webform"
        data-client-key="YOUR-CLIENT-GUID"
        data-agent-key="YOUR-AGENT-GUID"
        data-language="en"
        data-container="#nc-form"></script>

The simplest way to get it is from the Netcoder app: open your AI agent, then Test & Deploy, and the code icon of Test Form. The code is shown with your keys already filled in, ready to copy.

Your AI agent needs a Web Form channel, and an email channel to answer from: both are set up with Netcoder.

2. Configuration parameters

Set on the script tag.

AttributeRequiredDescriptionDefault
data-backend-urlYesAddress of the Netcoder relay: https://chatrelay.netcoder.ca/webform
data-client-keyYesYour client key
data-agent-keyYesThe key of your AI agent
data-languageen or fr: the labels of the formen
data-phonevisible, required or hiddenvisible
data-companyvisible, required or hiddenvisible
data-titleTitle above the form
data-containerCSS selector of the element to draw the form inBefore the script
data-accent-colorColour of the button#D97955
data-accent-text-colorColour of the text of the button#FFFFFF

3. How it works

  • The visitor gives a name, an email and a message; the phone and the company are optional, required or not asked, as data-phone and data-company say.
  • The form is sent to Netcoder as soon as it is posted, and the visitor is thanked at once.
  • Your AI agent answers by email, usually within minutes, in the language the visitor wrote in.
  • An agent whose job is to sell also adds the visitor to your contacts.
  • A second message from the same email address continues the same conversation.

4. Styling with CSS

For more than the button colours, style the form from your own stylesheet. Start your selectors with body to win, rather than using !important.

body .ncf-primary { padding: 12px 28px; }
SelectorWhat it is
.ncfThe form
.ncf-titleThe title
.ncf-fieldA label and its field
.ncf-primaryThe send button
.ncf-statusThe messages under the button

5. Testing and troubleshooting

  • Test before you install — Test Form, under Test & Deploy in the app, sends a real message: you receive the answer of the agent by email.
  • “Invalid configuration” — a key is missing or malformed. Copy the code from the app.
  • No answer by email — check your spam folder, then that the agent has an email channel.
  • Any domain works — nothing needs to be configured on your server.

Need help? Book a meeting or write to us.