Power the Polls
This is a custom web component that allows our partners to embed the Power the Polls signup form on their own web sites and intranets. Contact info@powerthepolls.org to discuss any partnerships.
How to embed
HTML
Include the latest version:
<script type="module" src="https://unpkg.com/@ptp-us/power-the-polls-form@latest/power-the-polls-form.js"></script>
Reference it like any other HTML element:
<power-the-polls-form
destination="http://form-target-here"
custom-form-field-label="Label for your own custom field here"
/>
React
In your index.tsx
Add the following code to initialize the form element:
import { applyPolyfills, defineCustomElements } from "power-the-polls-form/dist/loader";
applyPolyfills().then(() => {
defineCustomElements();
});
In your JSX/HTML
Note that in our testing attribute names must be kebab-case
and not camelCase
<power-the-polls-form
destination="http://form-target-here"
custom-form-field-label="Label for your own custom field here"
/>