In This Article:

    Client-side validation for required fields

    In This Article:

      Donation pages submit their data to Salsa exactly as the supporter typed it in.  If any of the required fields are missing, then Salsa returns with an error dialog like this:

      2017-04-06_1102.png

      Wouldn't it be a lot better if the missing fields were highlighted immediately and the donor would not have to wait to get the ugly error message?

      2017-04-06_1105.png

      If that is something that you'd like to have on your donation page, then read on!

      Solution

      The solution is to add a script and some CSS (style) declarations to templates that are assigned to donation pages.  Here are some steps that you can use:

      1. Edit a template used by donation pages.  Click here if you need help gettting started with that.
      2. Use the browser's 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. Find and click the "Raw" button.  A new window will appear that contains just the solution.
      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. Save the template.
      10. Test!

      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
      • A donate_page_KEY for a page that uses the modified template
      • A screenshot

      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.