progressivetech / net.ourpowerbase.remoteform

Remoteform allows you to easily create CiviCRM forms on a remote web site using a few lines of javascript code.
Other
13 stars 8 forks source link

Remoteform


NOTE: This extension's days are numbered. See work on oembed standard in CiviCRM core. Once oembed is fully functional in CiviCRM, this extension will be deprecated and no longer maintained.

Remoteform allows you to add a CiviCRM form to a remote web site via a few lines of javascript code.

Currently, only profiles and contribution pages are supported (events and petitions are in the works).

How does it work?

Full documentation is available. See below for an overview.

First, click Administer -> Customize data and screens -> Remote Forms.

Enter your web site's address. Only the addresses listed here will be able to submit forms to your CiviCRM instance.

Choose URLs to allow

Note: Drupal 8+ users must also update your services.yml file.

Second, edit the profile or contribution page to enable remoteform. Here's an example of a profile page (look in Profile Settings -> Advanced Settings):

Enable remoteform for a contribution

Third, copy and paste the provided javascript code to your remote web site and you are done.

Profile shown on remote site

Can I configure how the fields are displayed.

Yes, the javascript api is fully documented. You can change just about everything.

Is this secure?

This extension does open a tiny hole in your CiviCRM armour. Specifically, it allows the sites you specify to by-pass the normal CORS restrictions.

CORS prevents one web site from getting your web browser to post data to another web site, unless the website you are posting to specifically allows it.

There is a good reason for CORS! The main reason is to prevent one malicious web site from taking over your browser and posting information to another web site without your knowledge (for example, a web site could secretly get your browser to change your password in your CiviCRM installation and then take over your account).

Remoteform mitigates against this danger in two ways:

License

The extension is licensed under AGPL-3.0.

Requirements

Known Problems

If you or any one who wants to fill out a form generated by Remoteform has Privacy Badger or similar software that restricts javascript from passing data about your session to remote servers, then Remoteform won't work. It will, however, display a friendly warning suggesting that the user disable privacy badger or any other security restrictions that may be in place.