How Can We Help?

Using Bootstrap design for aNinja forms

You are here:
< All Topics

Bootstrap isĀ a CSS library that you use to create modern websites and web apps. It’s open-source and free to use, yet features numerous HTML and CSS templates for UI interface elements such as buttons and forms. Bootstrap also supports JavaScript extensions. It is used for developing responsive websites.

In aNinja, Bootstrap is used to give aNinja forms a nice-looking design when embed on the website.

However, when embedding aNinja’s forms on your website, it might overwrite the Bootstrap used there.

The Form embed code for the Website

After creating your aNinja form, it generates a Javascript code that you need to embed your aNinja form on your website. It looks like this:

<script id=”aninja-form-1″ data-aninjaform=”true” data-skip_bootstrap=”false” charset=”utf-8″ type=”text/javascript” src=”https://aninja.com/forms/widgets/w1.js?v=”></script><script>aNinja.forms.create({ant:”demo”,form_id:”1″});</script>

We’ve added a data attribute inside this code that enables you to either include or skip Bootstrap design in the form.

Setting the Bootstrap design

  • If you set the Bootstrap design to False, then it excludes aNinja’s Bootstrap design in the form. This allows the website embedding the script to use the Bootstrap design used there, and it doesn’t get overridden. However, if there’s no Bootstrap design used in the website, then the form design will be off, as there won’t be any styling.
  • If you set the Bootstrap design to True, then it uses aNinja’s Bootstrap design and overwrites the one used on the website.
  • Now that you’ve decided whether to include or skip Bootstrap design; just copy the Javascript code and paste it on your website to post your aNinja form there.

If you need any assistance with this, just leave us an email at support@aninja.com. Our Support team will happily assist you!

Table of Contents