Three ways to add a form
OctaForms renders no markup on its own, so you choose how the form reaches the page. There are three levels, and they trade convenience for control. You can mix them across different forms on the same site.
At a glance
Section titled “At a glance”| Approach | You write | You get | Best for |
|---|---|---|---|
| Starter shortcode | Nothing but [octa_form slug="…"] |
An unstyled working form | Getting live fast, testing, prototypes |
| JS helper | Your own HTML markup | Submission, validation display and the token wired up for you | Most themes |
| Your own JavaScript | Markup and all the request logic | Full control over every request and response | Custom UX, SPAs, headless |
How to choose
Section titled “How to choose”- You just want a working form. Use the shortcode. Style it later or move up a level when you need to.
- You want your own markup and styles, but not to hand-write fetch calls. Use the helper. You keep control of the HTML, and it handles the security token, the submit request, retries and showing validation errors.
- You want to own every request. Talk to the REST API directly. You implement the token contract and the submission call yourself. This is the path for single-page apps, custom front ends, and anything headless.
Whichever you pick, the form’s slug is what ties your markup to its config. That never changes.