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!
We'll use these steps to add separate text for address and letter pages in a targeted action.
- Edit the action.
- Add text to the Brief Description for the address page.
- Add text to the Brief Description for the letter page.
- Add a script to the template used by targeted actions.
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
- Find the Brief Description field, then click the "Source" button.
- 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.
Here's an example.
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.
Here's an example.
4. Test the results.
View the action. You should see something like this.
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.
- Locate and click the "Source" button. The contents of the Brief Description will appear as HTML.
- Locate each of the <hr /> tags in the content.
- Very carefully delete just "<hr />" everywhere it appears.
- 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.
- Edit a template. Click here if you need help getting started.
- Use the browser's search tool to locate the
- Insert a blank line just before the
- Click here to view the page where the script lives.
- Locate and click the "Raw" button. A new window will appear that contains just the script source.
- Copy the contents of the window and close it.
- Return to the template editor.
- Paste the copied text into the newly inserted line in the template.
- Save the template.
View the targeted action to see the script in action. The first page will have address page text and not the letter page text.
The second page will have the letter page text and not the address page text.
If you have any questions, then please gather this information.
- Your organization key.
- Your chapter key if you are in a chapter.
- The URL for the modified template. You can find the URL in the browser's address bar when you are editing the template.
- 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 email@example.com. We'll be glad to help.
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!