How do I embed a form in my own web site?

Powerbase runs on a different server and uses a different domain name then your normal web site. However, often organizations want people to fill out a form from Powerbase while browsing their one web site.

This article covers the many ways to accomplish that task.

Don't embed

If your primary concern is to have a smooth experience for your visitors, you may not need to embed at all. We can create a theme on your Powerbase site that is similar to the look and feel of your web site. Then, you can simply add a link from your web site to the Powerbase form. Since the look and feel are consistent, most visitors won't even realize that they left your site.

This approach will always be the least technically complicated and most reliable. All things being equal, it's the best option.

Use remote form

Some organization's web site designs are too complicated to easily replicate on Powerbase.

If that's the case, and you are working with a profile form or a simple contribution page, you can use remoteform. With remoteform, you can copy and paste a few lines of javascript code to your web site and your form will appear. Users will fill it out, hit submit and never leave your web site.

The only downside to remoteform is that it only works for profiles and simple contribution pages. Complex contribution pages (using memberships, recurring donations, etc) are not supporeted. Neither are event registration and petitions.

Other options (not recommended)

There are two other options commonly used in the past that we no longer recommend.

  • html snippets: It is possible to generate an html snippet from a profile and copy and paste the html onto your web site. When a user submits the form, they are redirected to powerbase where the data is stored and then redirected back to your web site. This feature is deprecated in CiviCRM for security reasons and can easily be replicated with remote form.
  • iframes: it is possible to create a theme for your powerbase that is plain white with no design. Then, you can add an iframe to your web site that pulls in any form from your site. The main downside to this approach is that, while it works now, it is not future proof. For obvious reasons, web browser designer do not like it when you visit one page to fill out a form that is stored on a different page without the user knowing they are on two different servers. As you can imagine, it's a good way to trick someone into filling in a petition or other form that they don't agree with.

What about...

...embedding petitions or event registrations? Unfortunately, it's not possible. We are still working on remoteform and hope to add that functionality in a future release.

Category: 
Admin Tasks
Collecting and Managing Contact Information
Customizing PowerBase