Embedding Forms

Embed your TinyForms on any website using a simple code snippet. Choose from 5 display modes depending on how you want the form to appear to visitors.

Embed modes

ModeDescriptionBest for
StandardInline embed: form appears directly in the pageContact forms, feedback, surveys placed within page content
PopupCentered overlay with a backdropLead capture, exit intent, promotional offers
SliderSlides in from the bottom or sideFeedback widgets, support requests
Side TabPersistent tab on the edge of the screenAlways-available feedback, help requests
Full PageTakes over the entire browser windowDedicated survey pages, application forms

How embedding works

  1. Go to your form → Share tab
  2. Click Embed
  3. Select your display mode
  4. Configure options (trigger, size, colors)
  5. Copy the generated code snippet
  6. Paste it into your website's HTML

Code snippet

Every embed mode generates a two-part snippet:

<!-- 1. Include the TinyForms script (once per page) -->
<script src="https://embed.tinycommand.com/forms.js"></script>

<!-- 2. Initialize the form -->
<script>
  TinyForms.init({
    formId: 'frm_abc123',
    mode: 'standard',    // standard | popup | slider | side-tab | full-page
    container: '#my-form' // CSS selector (standard mode only)
  });
</script>

Common configuration options

These options are available across all embed modes:

OptionTypeDescription
formIdStringYour form's unique ID
modeStringDisplay mode
themeStringlight or dark
hideHeaderBooleanHide the form title and description
hideFooterBooleanHide the "Powered by TinyCommand" footer
prefillObjectPre-fill field values (see Prefill)
onSubmitFunctionCallback when the form is submitted
onCloseFunctionCallback when the form is closed (popup/slider/side-tab)

Event callbacks

TinyForms.init({
  formId: 'frm_abc123',
  mode: 'popup',
  onSubmit: function(data) {
    console.log('Form submitted:', data);
    // Track conversion, show thank you, etc.
  },
  onClose: function() {
    console.log('Form closed');
  }
});

WordPress, Webflow, and other platforms

WordPress

Use the TinyForms WordPress plugin or paste the embed code into a Custom HTML block.

Webflow

Add an Embed element and paste the code snippet into it.

Squarespace

Add a Code Block and paste the snippet.

React / Next.js

Use the embed script in a useEffect hook:

useEffect(() => {
  const script = document.createElement('script');
  script.src = 'https://embed.tinycommand.com/forms.js';
  script.onload = () => {
    window.TinyForms.init({
      formId: 'frm_abc123',
      mode: 'standard',
      container: '#form-container'
    });
  };
  document.body.appendChild(script);
}, []);

Troubleshooting

IssueCauseFix
Form not loadingScript blocked by CSPAdd embed.tinycommand.com to your Content-Security-Policy
Form too smallContainer has no heightSet a minimum height on the container element
Popup not openingScript loaded twiceInclude the script only once per page
Styling conflictsYour site's CSS affects the formThe form renders in an iframe; conflicts are rare but check z-index
Tip

For the best user experience, use Standard embed for forms that are part of the page content (contact forms, application forms) and Popup for forms that interrupt the user flow (newsletter signups, exit intent offers).