This is a set of JavaScript snippets to be used with ActionKit.
Adds a confirmation modal to donation pages when donation amount is greater than $250.
- Using jQuery
- Using Bootstrap
- Modal DIV is
#confirm-big-donation - Other amount field is
#amount_other_field
Saves errors to a variable, which can then be read by tools like Selenium.
- None
Pre-fills form elements with values from query string, matching input name. ActionKit does this by automatically on some fields, but not all.
- Using jQuery
Uses "randomize-options" and "option" classes to randomize the order of elements in groups. Useful to avoid order bias in survey results.
- Using jQuery
- Randomized options are in container
.randomized-options - Each option is
.option
Uses included ccvalidator.js to display credit card type and validation.
- Using jQuery
- Using Bootstrap
- Credit card input is
#card_num - Credit card input and icons are in
#card_num_box - Credit card icons are in
.cc-icons - Each credit card icon is
.wf-iconand.icon-{type}, e.g..icon-visa
These scripts are compiled with gulp. To install gulp:
- Install NPM
npm installnpm install -g gulp
Then to compile:
gulp