https://github.com/efforg/petition-widget
Boilerplate code for embedding petitions
https://github.com/efforg/petition-widget
Last synced: 3 days ago
JSON representation
Boilerplate code for embedding petitions
- Host: GitHub
- URL: https://github.com/efforg/petition-widget
- Owner: EFForg
- License: agpl-3.0
- Created: 2014-08-05T11:42:52.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-06T05:16:41.000Z (almost 12 years ago)
- Last Synced: 2025-01-03T09:17:45.752Z (over 1 year ago)
- Language: CSS
- Size: 160 KB
- Stars: 1
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Call Widget
The call widget is a Javascript tool which allows developers to easily embed access to our [call congress tool](https://github.com/tfrce/call-congress).
Check out the demo!
## Getting Started
```html
Call Your Legislators
Zip Code
Phone Number
What to say
Hi, I'm one of Representative/Senator _______'s constituents, and I'm calling to oppose Fast Track for the Trans-Pacific Partnership agreement. Congress needs time to debate and amend trade agreements that affect all of us. Fast Tracking the TPP is undemocratic, and I expect my lawmakers to oppose it. I'll be watching this issue closely in 2014.
You can press * at any time to hang up and call the next representative.
Call didn't come through? Try again.
var tforce_config = {
campaign: 'stop-fast-track'
};
```
Simply copy and paste that where you would like your form to appear. Make sure the **ids** are set but feel free to change the structure of the HTML/CSS to match your website's design.
You can view a basic example of the form on our [default.html](http://tfrce.github.io/call-widget/example/default.html).
On success the `div#tf-call-widget-success` will be shown and the form hidden.
Feel free to remove the external style sheet, if you would like to add your own styles. Error messages are done in the css using `:after` pseudo class.
## Direct API Access
You don't need to use our Javascript and can view the [full documentation](http://github.com/tfrce/call-congress) of the call-congress API or even run up your own call-congress server. Use Github issues to get in touch!