In This Article:

    Capitalize all words in all fields in a Salsa form when it's submitted

    In This Article:

      Background

      Several clients have asked for a way to make sure that all of the fields submitted by a supporter have the correct capitalization.  While it's impossible to correctly capitalize every name that supporters use, the bulk of them can be handled correctly with a script in your template.

      Solution

      The solution is a script that capitalizes all of the input fields before they are sent to Salsa. Using this script is a two-step process: Upload and Install.

      Upload

      The script lives on a page in GitHub.  For you to use it, it must be copied to Salsa.  Here are some steps that you can use.

      1. Click here to see the page where the script lives.
      2. When the page appears, click on the Raw button.  A window will appear that contains only the solution.

      2016-02-10_1636.png

      1. Use the browser's save tool to save the contents of the window to your disk.  Be sure to name the saved file capitalize_fields.js.  This is  important.
      2. Close the content window after you've save the file to disk.
      3. Upload capitalize_fields.js from your disk to Salsa.  Click here if you need help doing that.
      4. When the upload is done, Salsa will display the URL for the file. Since we'll need that URL for the installation step, you may want to copy it and paste it somewhere that you can retrieve it later.

       

      Installation

      Installation adds the script to a template.  If capitalizing all words is important for all forms forever, then be sure to use these installation steps every time that you put a new template into service.

      1. Edit a template.  Click here if you need help getting started.
      2. Use the browser's search tool to locate the </body> tag.

      2016-03-24_1051.png

      1. Insert a blank line just before the </body> tag.
      2. Copy this text:
      <script type="text/javascript" src="SCRIPT_URL_HERE"></script>
      1. Paste the copied text into the newly inserted line.
      2. Replace SCRIPT_URL_HERE with the script filename URL from step NNNN.
      3. Save the template.
      4. Test!

      Questions?

      If you have any questions, then please gather this information

      Send all of 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.