In This Article:

    Pass an amount and click a radio button in a donation page

    In This Article:

      Salsa lets you pass an amount to a donation page.  Salsa always puts that amount into the "Other amount" field, however, even if the amount matches one of the radio buttons.  For an example, setting a default amount to $35 with a URL like this:

      https://wfc2.wiredforchange.com/o/8001/p/salsa/donation/common/public/?donate_page_KEY=8455&amount=35

      will put $35.00 into the "Other amount" field even though there is a radio button for $35.00.

      If you'd like a passed amount to click a radio button, then this is the solution for you.

      Summary

      Here's an example.  This URL passes a default amount of $35.00 to the donation page.

      https://wfc2.wiredforchange.com/o/8001/p/salsa/donation/common/public/?donate_page_KEY=8455&amount=35

      With this solution in place, that URL will automatically click the "$35.00" radio button.

      If the amount in the URL is not a radio button on the donation page, then the script puts that amount into the "Other" field.  For example, clicking a link like this

      https://wfc2.wiredforchange.com/o/8001/p/salsa/donation/common/public/?donate_page_KEY=8455&amount=66

      will put $66.00 in the Other field.

      Installation

      1. Edit the template for the donation page.  Click here if you need help getting started with that.
      2. Use the browser search tool to locate the </body> tag.
      3. Insert a blank line just before the </body> tag.
      4. Click here to see the page where the solution lives.
      5. Click the Raw button.  A window containing just the solution will appear.
      6. Copy the contents of the window and close it.
      7. Return to the template editor.
      8. Paste the copied text into the newly inserted line in the template.
      9. Configure the default value.
      10. Save the template.
      11. Test!

      Configuration

      The script allows you to set a default value to click if there is no value passed in the donation page URL.  For example, if you make the default value $50.00 then clicking on this link

      https://wfc2.wiredforchange.com/o/8001/p/salsa/donation/common/public/?donate_page_KEY=8455

      will automatically click the "$50.00" radio button.

      If $50.00 works for you as a default amount, then you do not need to do anything.  Use these steps to choose another default amount.

      1. You should already have the template editor open.  If you do not, then edit the template used by your donation page.  Click here if you need help getting started with that.
      2. Use the browser's search tool to locate "defaultAmount = 50;".
      3. Change "50" in the text to be the default amount that you'd prefer.
      4. Save the template.
      5. Test!

      Caution: The suggested amount must be a whole number and cannot contain punctuation or spaces.  For example, $510.00 is wrong.  510 is right.

      Questions?

      If you have any questions, then please gather this information.

      • Your organization_KEY
      • Your chapter_KEY if you are in a chapter
      • The template_KEY of the modified template.
      • The donate_page_KEY of a donation page that uses the modified template.
      • A screenshot, if possible.

      Send this information to support@salsalabs.com, and we'll be glad to help.

      Was this article helpful?
      0 out of 0 found this helpful
      Have more questions? Submit a request

      Comments

      0 comments

      Please sign in to leave a comment.