HTML Sample

Throughout the system there are different types of actions that individuals can take. There are Petitions, Targeted Emails, & Multi Targeted emails.

This can be utilized with our "Actions 2.0" framework (https://hq-org.salsalabs.com/dia/hq/p/dia/action/hq/) and creating a new item. Simply fill out some of the basic data on the page, etc. This will create all of the database entries to correlate the data together that you're looking to capture as well as give you a GUI for taking the first few steps.

When it comes to targeting though, that's where things get tricky. At first glance, one would only need to select "US Senators" from the first mutli-select box and then Barack Obama & John McCain from the list. If you do this though, this is a location based target that will prompt the user for the zip code in order to determine their proper representatives for email targeting. In this case, we can create two custom recipients and have them populated with the email addresses you wish to target. By using custom recipients, you ensure that all users will target these individuals regardless of their location.

After you have created the basic action, you are ready to begin coding your local page. You will need to know the following pieces of information:

  • Organization KEY
  • Action KEY
  • Action Content KEY

All of these are acquired through the headquarters and within the URLs of the action page and corresponding content items.

Once you have collected all of this information you are ready to review the code and make changes as needed. Please review the code below:

<html>
<head>
<title>
</title>
</head>
<body>

<form name="Sampleform"
    action="https://org.salsalabs.com/dia/api/action/wrapperProcessAction.jsp">
//replace the organization_KEY with your key
<input type="hidden" name="organization_KEY" value="01010">
//replace the action_KEY with your key
<input type="hidden" name="action_KEY" value="305"/>
//replace the action_content_KEY with your key
<input type="hidden" name="global:action_content_KEYS" value="0,406"/>

<label for="Subject">Subject: GET YOUR ACT TOGETHER!</label>

//please note, when defining the subject & content names, you must specify
// the action content key as a part of the subject. 
// If you do not do this, no subject nor content will be sent, BUT an entry
// will be made in the supporter action table
<input type="hidden" name="Subject406" size="45" value="GET YOUR ACT TOGETHER!"
    readonly="readonly" />
<input type="hidden" name="Content406"
    value="Dear Sir, Why do you hate the gulf coast?" />

<div id="Content_letter" class="letterContent">Dear Sir, 
Why do you hate the gulf coast?</div>

<div class='recipient'>
        <h2 class='name'>Barack Obama</h2>
        <div class='contact_info'>
            <div class='address'>Presidential Candidate</div>
        </div>
    </div>
    
    <div class='recipient'>
        <h2 class='name'>John McCain</h2>
        <div class='contact_info'>
            <div class='address'>Presidential Candidate</div>
        </div>
    </div>


<input type="hidden" name="table" value="supporter"/>


    <input type="hidden" name="key" value="0" />

    <label for="First_Name">First Name<span class='required'>*</span></label>

    <input title="First Name" type="text"  name="First_Name" class="blockInput"
        value="" size="25" /><br/>

    <label for="Last_Name">Last Name<span class='required'>*</span></label>
    <input title="Last Name" type="text"  name="Last_Name" class="blockInput"
        value="" size="25" /><br/>

    <label>Email<span class='required'>*</span></label>
    <input title="Email" type="text" name="Email" class="blockInput" value=""
        size="25" />
    <br/>

    <label for="Street">Street</label>
    <input title="Street 1" type="text" name="Street" value="" size="25" /><br/>

    <label for="Street_2">Street 2</label>
    <input title="Street 2" type="text" name="Street_2" value="" size="25" /><br/>

    <label for="City">City</label>
    <input title="City" type="text" name="City" value="" size="25" /><br/>

    <label for="State">State/Province</label>

    <select name='State' class="blockInput">
      <option value="">Select a state</option>
      <option value="AL" >Alabama</option>
      <option value="AK" >Alaska</option>
        <option value="AS" >American Samoa</option>
        <option value="AZ" >Arizona</option>
        <option value="AR" >Arkansas</option>

        <option value="CA" >California</option>
        <option value="CO" >Colorado</option>
        <option value="CT" >Connecticut</option>
        <option value="DE" >Delaware</option>
        <option value="DC" >D.C.</option>
        <option value="FL" >Florida</option>

        <option value="GA" >Georgia</option>
        <option value="GU" >Guam</option>
        <option value="HI" >Hawaii</option>
        <option value="ID" >Idaho</option>
        <option value="IL" >Illinois</option>
        <option value="IN" >Indiana</option>

    <option value="IA" >Iowa</option>
        <option value="KS" >Kansas</option>
        <option value="KY" >Kentucky</option>
        <option value="LA" >Louisiana</option>
        <option value="ME" >Maine</option>
        <option value="MD" >Maryland</option>

        <option value="MA" >Massachusetts</option>
        <option value="MI" >Michigan</option>
        <option value="MN" >Minnesota</option>
        <option value="MS" >Mississippi</option>
        <option value="MO" >Missouri</option>
        <option value="MT" >Montana</option>

        <option value="NE" >Nebraska</option>
        <option value="NV" >Nevada</option>
        <option value="NH" >New Hampshire</option>
        <option value="NJ" >New Jersey</option>
        <option value="NM" >New Mexico</option>
        <option value="NY" >New York</option>

        <option value="NC" >North Carolina</option>
        <option value="ND" >North Dakota</option>
        <option value="OH" >Ohio</option>
        <option value="OK" >Oklahoma</option>
        <option value="OR" >Oregon</option>
        <option value="PA" >Pennsylvania</option>

        <option value="PR" >Puerto Rico</option>
        <option value="RI" >Rhode Island</option>
        <option value="SC" >South Carolina</option>
        <option value="SD" >South Dakota</option>
        <option value="TN" >Tennessee</option>
        <option value="TX" >Texas</option>

        <option value="UT" >Utah</option>
        <option value="VT" >Vermont</option>
        <option value="VI" >Virgin Islands</option>
        <option value="VA" >Virginia</option>
        <option value="WA" >Washington</option>
        <option value="WV" >West Virginia</option>

        <option value="WI" >Wisconsin</option>
        <option value="WY" >Wyoming</option>
        <option value="AA" >Armed Forces (the) Americas</option>
        <option value="AE" >Armed Forces Europe</option>
        <option value="AP" >Armed Forces Pacific</option>
        <option value="AB" >Alberta</option>

        <option value="BC" >British Columbia</option>
        <option value="MB" >Manitoba</option>
        <option value="NF" >Newfoundland</option>
        <option value="NB" >New Brunswick</option>
        <option value="NS" >Nova Scotia</option>
        <option value="NT" >Northwest Territories</option>
        <option value="NU" >Nunavut</option>
        <option value="ON" >Ontario</option>
        <option value="PE" >Prince Edward Island</option>
        <option value="QC" >Quebec</option>
        <option value="SK" >Saskatchewan</option>
        <option value="YT" >Yukon Territory</option>
        <option value="ot" >Other</option>
    </select></div><br/>

    <label for="Zip" >Zip/Postal Code</label>
    <input title="Zip Code" type="text" name="Zip" value="" maxlength="10" /><br/>

    <input type="hidden" name="required" value="First_Name,Last_Name,Email," /><br/>

    <input type="hidden" name="email_trigger_KEYS" value="0" /><br/>

    // this defines a table to link information to, note as we defined 'supporter'
    // above as the last table it will append '_action' 
    // to the last table as it is the value defined to allow for foreign key
    // relationships to be established 
    <input type="hidden" name="link" value="action"/>
    // this is the value of the action_key defined above 
    <input type="hidden" name="linkKey" value="305"/>

    <input name="submit" type="submit" value="Send Your Message" />
    <br/>


</form>
</body>
</html>