Custom success state
Replace the form with your own designed success or error block, or show a custom text message.
Every form has a Success Message and a Fail Message. For more control you design the success state yourself: put any element with the class dh-form-success inside the form. After a successful submit the form is replaced by that element and the class is removed so it becomes visible. The same works for errors with dh-form-fail. Builder forms have their own success and fail blocks (.dh-fb-success, .dh-fb-fail). On success the steps and actions are hidden and the success block is shown; the fail block shows for 5 seconds.
How it works
- Platform CSS hides .dh-form-success and .dh-form-fail by default.
- Hand-made form: first descendant .dh-form-success (any depth) replaces the form's content on success; .dh-form-fail on failure; otherwise the response message is shown as plain text.
- Builder form: .dh-fb-success / .dh-fb-fail rendered from successMessage / failMessage.
- Messages are always rendered as text, never HTML.
- The Success and Fail messages are also editable in the dashboard form settings (General tab).
- MCP: messages must be plain text (no < or >).
When to use it
- A success card with an icon and a link to book a call
- A friendly error block with a phone number
Limitations
- Messages are plain text; HTML in the message is shown literally.
Availability
- Works in Designer, AI Studio and MCP.
How to use it.
- Inside your form add a Div with the class dh-form-success and design it.
- Optionally add a Div with dh-form-fail.
- Publish; the blocks stay hidden until a submit.
Related features.
Redirect on success
Send visitors to another page after a successful submission, only to safe http(s) URLs on your own domain or allowed hosts.
Custom HTML forms
Build a form from native form, input, textarea, select and label elements and connect it to a Divhunt form for storage and delivery.
Form events in JavaScript
Run your own code when a form is submitted, succeeds or fails, with the form data and the server response.
Browse other features
Designer
Bring your ideas to life with our visual website builder. Drag and drop with ease, or dive into coding when needed.
→AI Studio
Describe it and AI builds it. Every change lands in the same project you can open in the Designer.
→MCP
Connect Claude Code, Cursor or any MCP client and build whole sites with your own agent.
→CMS
Create, organize, and manage your dynamic content with the maximum freedom and flexibility of our visual CMS.
→SEO
Divhunt delivers ultra-fast & structured sites that are good for ranking by default, while offering complete control for customization.
→REST API
Easily link to any REST API endpoint with instant preview and expand your site’s functionality smoother than ever before.
→Plugins
Divhunt offers an open platform for creating plugins to upgrade features, add new capabilities, and simplify building better sites.
→Localization
Localize everything from static pages and CMS content to URLs and metadata, in up to 15 languages with no add-on.
→Interactions
Visually create animations and interactions with a simple, intuitive timeline. Build smooth, engaging experiences without code.
→Custom Files
Manage JS and CSS files with a structure developers love, combining folders and clean organization.
→Memberships
Create plans, decide who sees what and connect it all to your CMS. Build courses, communities or client portals.
→