Skip to content

Commit

Permalink
Update README.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
snokamedia committed Dec 30, 2022
1 parent 94aa037 commit 7f20f63
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions chform-shortcode/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ License URI: https://www.gnu.org/licenses/gpl-3.0.html
A plugin that adds a shortcode to embed CanadaHelps donation forms on your WordPress site. With support for URL parameters and automatic language selection, this plugin makes it easy to accept donations from your site visitors.

== Key Features ==
- Embed CanadaHelps donation forms on your site with a shortcode
- Use URL parameters to customize the donation form
- Automatic language selection based on user's locale
- Modal popop for showing the donation form

- Embed a form on your WordPress site using the [chform] shortcode.
- Set the language of the form to either English ('en') or French ('fr').
- Customize the form's height and maximum width.
- Display the form in a modal window or as a regular embedded form.
- Pre-fill the form with a donation amount and frequency using URL parameters.
- Customize the look of the form using CSS variables.

== Installation ==
1. Download and unzip the plugin
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Add the shortcode to the pages you want to display the form, using the following format: [chform id=12345]. Replace "12345" with the page id provided by CanadaHelps.
3. Add the shortcode to the pages you want to display the form, using the following format: `[chform id=12345]`. Replace "12345" with the page id provided by CanadaHelps.

== Shortcode Attributes ==
- **id** (required): The page id from the embed code provided by CanadaHelps.
- **language** (optional): Specify the language of the donation form. Options: "en" for English or "fr" for French. If not specified, the plugin will use the user's locale to determine the language.
- **height** (optional): This attribute allows you to set the height of the CanadaHelps donation form iframe. The default value is "1884px". You can specify a numeric value with a "px", "em", "rem", or "%" suffix. Default: '1760px'
- **modal** (optional): This bool attribute turns the form into and inline modal that opens with button. Options: True or False Default: False
- **max-width** (optional): Applicable only if the modal attribute is enabled, set the max-width of the modal iframe container div. You can specify a numeric value with a "px", "em", "rem", or "%" suffix. Default: 940px
- **button-text** (optional): Applicable only if the modal attribute is enabled, set the button. Default: 'Donate Now'
- **height**: The height of the form. Default is '1760px'.
- **modal**: Whether to display the form in a modal window or not. Can be either 'true' or 'false'. Default is 'false'.
- **max-width**: The maximum width of the form. Default is '940px'.
- **button-text**: The text to be displayed on the button. Default is 'Donate Now'.

### Examples

Expand All @@ -42,17 +43,25 @@ To specify the modal form with an iframe height of 735px, max-width of 500px, wi
[chform id=12345 height=735px max-width=500px modal=true button-text='Donate']

== URL Parameters ==
You can use the following URL parameters to customize the donation form:

- **amount**: The amount that the user will donate. Must be at least 3 (CanadaHelps' minimum).
- **frequency**: The frequency of the donation. Currently, the only option is "monthly".
In addition to the shortcode parameters, the form can also be customized using the following URL parameters:
- **amount**: The donation amount to be pre-filled in the form.
- **frequency**: The donation frequency to be pre-selected in the form. Can be either 'one-time' or 'monthly'.
- **modal**: If set to true will open the modal on page load if the shortcode attribute **modal** is also set to true.

### Example

To automatically open the modal, specify a donation amount of $1000 with a monthly frequency, you would use the following URL parameters:
To display a form with the ID 123 in French in a modal window with a pre-filled donation amount of $50 and a pre-selected frequency of monthly:

http://example.com/page-with-form/?amount=50&frequency=monthly&modal=true

### Note

?amount=1000&frequency=monthly&modal=true
The `modal` URL parameter allows you to open the form in a modal window on page load. To use this parameter, set its value to `true` in the URL.
For example:
http://example.com/page-with-form/?modal=true
Note that this parameter will only have an effect if the `modal` attribute in the shortcode is also set to `true`. If the `modal` shortcode attribute is not set or is set to `false`, the form will not be displayed in a modal window regardless of the value of the `modal` URL parameter.
If the `modal` attribute is set to `true` but the `modal` URL parameter is set to `false`, the form will still be displayed in a modal window when the button is clicked.

== Troubleshooting ==
If you encounter any issues with the plugin, try the following:
Expand All @@ -62,8 +71,18 @@ If you encounter any issues with the plugin, try the following:
3. If the issue persists, try deactivating and reactivating the plugin, or contact us for further assistance

== Disclaimer ==
Our plugin relies on a third-party service, CanadaHelps (https://www.canadahelps.org/), for displaying your CanadaHelps forms with our shortcode. By using our plugin, you acknowledge and agree to be bound by the CanadaHelps Terms of Use (https://www.canadahelps.org/en/terms-of-use/) and Privacy Policy (https://www.canadahelps.org/en/privacy-policy/). Please make sure to review these documents before using our plugin.
This plugin is provided as-is without any guarantees or warranties. Some information is provided in an effort to clarify and provide relevant information for users who may have trouble using the plugin.

Our plugin relies on a third-party service, CanadaHelps (https://www.canadahelps.org/), for displaying your CanadaHelps forms with our shortcode. By using our plugin, you acknowledge and agree to be bound by the CanadaHelps Terms of Use (https://www.canadahelps.org/en/terms-of-use/) and Privacy Policy (https://www.canadahelps.org/en/privacy-policy/). Please make sure to review these documents before using our plugin.
We are not affiliated with CanadaHelps and are not responsible for their services or any issues that may arise from the use of their services. For any questions or issues related to CanadaHelps, please refer to their website (https://www.canadahelps.org/) or contact them directly.

If you have any questions or concerns about the use of CanadaHelps in our plugin, please do not hesitate to contact us

== Upgrade Notice ==

In version 2.0.0, we removed the use of the https://www.canadahelps.org/secure/js/cdf_embed.js script and any functions it provided. If your previous implementation relied on any of these functions, you will need to update your code to work without them. Please note that we cannot guarantee compatibility with any custom scripts or functions that relied on the removed script.
We recommend testing your implementation after upgrading to ensure that it is still functioning as expected. If you encounter any issues, you may need to make additional updates to your code to account for the removal of the script and its functions.
We apologize for any inconvenience this may cause. Thank you for your understanding.

== Changelog ==

A complete changelog of all changes made to the plugin can be found on our [GitHub repository](https://github.com/snokamedia/chform-shortcode/releases).

0 comments on commit 7f20f63

Please sign in to comment.