In This Article:

    Separate text for address and letter pages in targeted actions

    In This Article:

      A client pointed out that it would be very handy to configure a targeted action so that one set of text appears on the address page, and another set of text appears on the letter page.

      The purpose? The text on the address page will get folks to take the action. The text on the letter page will focus action takers on the task at hand. If that sounds like something that you'd like to have on your targeted actions, then read on!

      Summary

      We'll use these steps to add separate text for address and letter pages in a targeted action.

      1. Edit the action.
      2. Add text to the Brief Description for the address page.
      3. Add text to the Brief Description for the letter page.
      4. Add a script to the template used by targeted actions.
      5. Test!

      Details

      1. Edit the action

      Begin by editing the targeted actions. Please click here if you need help getting started.

      2. Add the default text to the action

      1. Find the Brief Description field, then click the "Source" button.

      Screenshot_at_Sep_23_16-40-07.png

      1. Copy this text and paste it into the Brief Description.
      <div id="info-page">
        <div id="description" class="description">
          <div id="for-address-page">
            <hr>
            <p style="text-align:center">
              <span style="font-size:x-large">Show this content on the first (address) page.</span>
            </p>
            <hr>
          </div>
          <div id="for-letter-page" style="display:none">
            <hr>
            <p style="text-align:center">
              <span style="font-size:x-large">Show this content on the second (letter) page.</span>
            </p>
            <hr>
          </div>
        </div>
      </div>
      

      2. Edit the address page text.

      The next step is to change "Show this content on the first (address) page" to the contents that you want action takers to see before they provide an address.  Do that by editing the area between the first two lines that cross the page. Save your work.

      Screenshot_at_Sep_23_16-10-08.png

      Here's an example.

      Screenshot_at_Sep_23_16-14-12.png

      3. Edit the letter page text.

      The next step is to change "Show this content on the second (letter) page." to the contents that you want action takers to see before they provide an address. The process is the same as for editing the address page text. Edit the area between the second two lines that cross the page. Save your work.

      Screenshot_at_Sep_23_16-15-54.png

      Here's an example.

      Screenshot_at_Sep_23_16-19-21.png

      4. Test the results.

      View the action. You should see something like this.

      Screenshot_at_Sep_23_16-21-42.png

      If you are seeing all of that, then we're just about done with the action itself. The last thing to do is to VERY CAREFULLY remove the lines that go across the page. Here are some steps that you can use.

      1. Locate and click the "Source" button.  The contents of the Brief Description will appear as HTML.
      2. Locate each of the <hr /> tags in the content.

      Screenshot_at_Sep_23_16-24-27.png

      1. Very carefully delete just "<hr />" everywhere it appears.
      2. Save your work.

      Configure the template.

      The last step is to add the script that will show and hide the text in the Brief Description. Here are some steps that you can use. You'll need to repeat these steps for every template that actions use.

      1. Edit a template. Click here if you need help getting started.
      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 view the page where the script lives.
      5. Locate and click the "Raw" button. A new window will appear that contains just the script source.
      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.

      Final test

      View the targeted action to see the script in action. The first page will have address page text and not the letter page text.

      Screenshot_at_Sep_23_16-27-11.png

      The second page will have the letter page text and not the address page text.

      Screenshot_at_Sep_23_16-30-07.png

      Questions?

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

      1. Your organization key.
      2. Your chapter key if you are in a chapter.
      3. The URL for the modified template. You can find the URL in the browser's address bar when you are editing the template.
      4. The URL of an action page that (1) uses the template, and (2) contains the special text for address and letter pages. You can find the URL in the browser's address bar when you are editing the action.

      Please send this information to support@salsalabs.com. We'll be glad to help.

      Kudos

      My thanks to the nice folks at We the People Massachusetts for the challenge, and for loaning me a test targeted action for this article.

      If this article is making your actions more effective, how about dropping by their site and making a donation? Show them how much you appreciate an excellent idea!

      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.