How to Add a Contact Form to Softgen

Embed the Helpdesky Contact Form in your Softgen app. Includes a ready to paste prompt for the Softgen AI builder.

Adding a Contact Form to Softgen lets your users send you a message without you setting up SMTP or a backend. The Helpdesky Contact Form drops in as one container div and one script tag, handles its own validation, and lands every submission in your Helpdesky inbox where you can reply by email.

This guide is for anonymous visitors. There is no login, no HMAC, no backend wiring. If you need a portal for signed in users instead, see the Ticket Center Setup Guide.

Why this is worth using on a Softgen project: the Free plan covers 15 conversations a month, you do not have to bolt on SMTP or a separate form service, and the form is a single embed your generated app drops into a contact page. Replies you send from the Helpdesky inbox are emailed back to the user.

Set Up Your Helpdesk

Open the Helpdesky dashboard and go to Contact Form in the sidebar. Copy the embed snippet at the top of the page. It already has your Helpdesk ID filled in:

<div id="hdh-contact-form"></div>
<script src="https://helpdesky.io/contact-form.js"
  data-helpdesk-id="YOUR_HELPDESK_ID"></script>

While you are there, also enable messaging from the Messages sidebar item if you have not already. The toggle is at the top of the Messages page.

Add the Embed Code

Softgen generates full stack apps from a prompt. The cleanest path is to ask Softgen's AI builder to add the embed for you, using the prompt in the next section. If you prefer to paste it directly, the embed is:

<div id="hdh-contact-form"></div>
<script src="https://helpdesky.io/contact-form.js"
  data-helpdesk-id="YOUR_HELPDESK_ID"></script>

In a typical Softgen Next.js or React project, render the container in your contact page component and load the script with next/script (Next.js) or a small useEffect (plain React).

Copy This Prompt for Your AI Builder

Paste the prompt below into the chat. It tells the agent exactly what to add and where to read the canonical instructions, so the agent fetches the real embed format instead of guessing.

we need to add the helpdesky contact form to the public site.
read the contact form section of the helpdesky skill file first: https://helpdesky.io/docs/skill.md
if you can use mcp, connect to https://helpdesky.io/mcp before you touch any code and enable the setup tool set if the embed tools are not listed. use it to enable messaging, add this site's domain to allowed embed domains, and fetch the contact form snippet with the helpdesk id already filled in.
if you cannot use mcp, ask me for the helpdesk id from the contact form page in the dashboard and i will enable messaging and add the domain myself.
softgen builds full stack apps. add a /contact page in the existing framework, inject the helpdesky script with the framework's idiomatic pattern (next/script or useEffect), and make sure the script loads exactly once.
then drop the embed snippet into the contact page.
the form does not need any secret env vars since it is for anonymous visitors.
when you are done, confirm the form renders and submits successfully.

The skill file is what the Helpdesky AI agent skill installs, so the agent gets the real embed format and the framework placement notes. With MCP connected it also handles the dashboard side: messaging on, your domain added to Allowed Embed Domains, and the snippet fetched with your Helpdesk ID already in it. Without MCP it asks you for the ID and you make those two changes in the dashboard.

Test It

Open the Softgen preview, submit a test message, and confirm the conversation lands in your Helpdesky Messages inbox. If submission fails silently, open the browser console and look for a blocked request to helpdesky.io. A custom CSP header on the Softgen deployment is the usual cause.

Next Steps

Route inbound support email into the same helpdesk by following the Email Forwarding Setup Guide. If you start getting bot submissions, layer on bot protection with the Cloudflare Turnstile Setup Guide. When you ship a signed in dashboard, swap the public form for a Ticket Center so users can see their full conversation history.

Let an AI Agent Reply for You

Your generated app now sends messages to Helpdesky, and an AI agent can send the answers back. Create one under Inbox → AI Agents (beta) and pick its Mode: Review drafts a reply and waits for one click approval in the inbox, Autopilot sends on its own within the pacing and guardrails you set.

Switch on Contact form under Behaviour → Channels so the agent picks up conversations from the form in your Softgen app. The user receives the reply by email, the same as a reply you write yourself.

Agents run on your own AI provider key from Settings → AI Settings, so save one first. Set Up Your First AI Agent walks through creating and testing an agent, and the guardrails and pacing guide covers delays, daily caps and hand off.

Cool Features

A couple of small things you can turn on once the basic form is live.

  1. Hide outer border: drop the form into any section without a background or border so it blends straight into your branding. From the Contact Form page, open the Layout section and toggle Hide outer border.
  1. Cloudflare Turnstile spam protection: if your domain is on Cloudflare, you can protect the form from bots in a few clicks. Open your Cloudflare account, go to Turnstile, add your domain, generate the keys, and paste them into the Helpdesky Contact Form settings. Full walkthrough in the Cloudflare Turnstile Setup Guide.
  1. Allowed Embed Domains: the Helpdesk ID is visible in your generated code, so stop other sites from using it to load your form. Under Settings → Messages → Allowed Embed Domains, add your app's domain; subdomains are included automatically, and an empty list allows every domain. Details in Restrict Embeds to Specific Domains.

  2. Make the form yours: the Custom Fields section adds Text, Text Area, Dropdown, Checkbox or Number fields between Email and Message, each of them optionally required. Labels, placeholders, the button text and the success text are all editable, so the form can be in the language of your app. Accent Style paints the button with your Branding colours, Use Branding Background and the colour pickers cover the rest, and the Custom CSS section has a View example snippets library (Brand Colors, Dark Mode / Dark Background, Rounded / Pill Style, Flat / Minimal, Custom Fonts, Full-Width Bold Button, Compact Form). See the Contact Form Setup Guide for every setting.

Last updated on October 13, 2026