In This Article:

    Change UPPER CASE, lower case and mIxEd CaSe names in Salsa forms

    In This Article:

      Background

      Do you have supporters that fill in forms and don't use the standard conventions for names?

      2015-08-06_1026.png

      If that bothers you, and you'd really rather than the form look like this before it's submitted, then read on!

      2015-08-06_1044.png

      Solution 1: All UPPER, lower and MiXeD cAsE input fields

      The solution to having clean input data when a form is submitted is to add a script that corrects the contents of every form before it is submitted.

      What IS changed

      All text input fields like the ones in the screenshots

      What IS NOT changed

      • Any large areas of text like Notes fields or the In Honor Of address field.
      • See the section titled "Skipping Fields" to learn how to exclude fields that you don't want to be modified for this script.

      Installation

      Here are some steps that you can use:

      1. Edit a template.
      2. Locate the </body> tag using the browser's search tool.
      3. Insert a blank line just before the </body> tag.
      4. Click here to view the solution source.
      5. Click on the Raw button.  A window with just the source will appear.
      6. Copy the source and close the window.
      7. Paste the source into the newly inserted line in the template.
      8. Save the template.
      9. Test!

      Solution 2: Only upper-case and lower-case input fields.

      Use this solution if you'd like to retain anything that a supporter types that has both uppercase and lower case characters. This comes in handy for folks that have lower-case parts of names (like 'de la Garza' or 'Abu bin Adam

      What IS changed

      • All text input fields that contain all upper-case or all lower-case text.

      What IS NOT changed

      • Any text fields that contain both upper- and lower-case text.
      • Any large areas of text like Notes fields or the In Honor Of address field.
      • See the section titled "Skipping Fields" to learn how to exclude fields that you don't want to be modified for this script.

      Installation

      Here are some steps that you can use:

      1. Edit a template.
      2. Locate the </body> tag using the browser's search tool.
      3. Insert a blank line just before the </body> tag.
      4. Click here to view the solution source.
      5. Click on the Raw button.  A window with just the source will appear.
      6. Copy the source and close the window.
      7. Paste the source into the newly inserted line in the template.
      8. Save the template.
      9. Test!

      Skipping fields

      If there are fields that you do not want this script to modify, then do the following:

      1. Gather the field names that you don't want to modify (for example, First_Name, City, etc.)
      2. Edit the template.
      3. Search for DO_NOT_MODIFY using the browser's search tool.  You'll see something like this:

      2015-08-06_1054.png

      1. Add the fields that you don't want to capitalize between the quotation marks.  Separate them from other fields using commas.  Do not use spaces.  Here's an example:
      var DO_NOT_MODIFY = "Email,First_Name,City".split(',');
      1. Double-check your work.
      2. Save the template.
      3. Test!

      Questions?

      If you have any questions, please collection 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 template
      • A screenshot, of 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.