How to Embed Forms

Method 1: iframe Embed

The simplest way to embed a form. Just copy and paste this code into your HTML:

<iframe
    src="https://bb-form-builder.botble.com/form/contact-form"
    width="100%"
    height="500"
    frameborder="0"
></iframe>

Method 2: JavaScript Embed

For better responsiveness and auto-height adjustment:

<div id="my-form"></div>
<script src="https://bb-form-builder.botble.com/vendor/core/plugins/bb-form-builder/js/embed.js"></script>
<script>
    BbFormBuilder.embed({
        container: '#my-form',
        formCode: 'contact-form'
    });
</script>

Live Embed Preview

JavaScript Options

The JavaScript embed supports these options:

Option Type Description
container string CSS selector for the container element
formCode string The unique code of your form
baseUrl string Optional. Override the base URL
height string Optional. Fixed height (e.g., "500px")

Tips & Best Practices

  • 1
    Use JavaScript embed for responsive forms

    It automatically adjusts height based on form content

  • 2
    CORS is handled automatically

    Forms can be embedded on any domain

  • 3
    Styling is isolated

    Forms use their own CSS and won't conflict with your site

  • 4
    Success/error messages work seamlessly

    Form submissions and validation are fully functional

Available Form Codes

Use these form codes in your embed:

contact-form
newsletter
customer-feedback
job-application
event-registration
Buy Now on Envato