← back to Petitionyour

views/find-reps.ejs

23 lines

<%- include('partials/head', { title: 'Find & Contact Your Representatives', description: 'Enter your ZIP to find your two U.S. Senators and your U.S. House representative, with their official government contact forms and phone numbers.' }) %>

<section class="wrap narrow">
  <h1>Find &amp; Contact Your Representatives</h1>
  <p class="lede">Enter your ZIP code to see your two U.S. Senators (resolved exactly) and your U.S. House representative. We open each member&rsquo;s <strong>official .gov contact form</strong> with your message ready to submit — we never send anything on your behalf, and we never claim to.</p>

  <div class="reps-widget reps-panel" id="reps-panel" data-sign-input="">
    <form id="reps-lookup-form" class="inline-form">
      <input type="text" id="reps-zip" placeholder="ZIP code" maxlength="10" value="<%= zip || '' %>">
      <button type="submit" class="btn btn-primary btn-sm">Look up</button>
    </form>
    <div id="reps-result" aria-live="polite"></div>
  </div>

  <% if (error) { %>
    <div class="alert alert-error"><%= error %></div>
  <% } %>

  <p class="coverage-note">How this works: your ZIP resolves to a state from a bundled USPS ZIP-prefix table (offline, free). Senators are then resolved exactly from that state. Because a single ZIP can span more than one congressional district, your exact House member is pinned only when your ZIP maps to one district, when your state has a single at-large seat, or when you enter your street address (a free U.S. Census lookup). Member data comes from the public-domain <a href="https://github.com/unitedstates/congress-legislators" target="_blank" rel="noopener noreferrer">unitedstates/congress-legislators</a> dataset, bundled locally and refreshable. If your ZIP doesn&rsquo;t resolve, use the official .gov tools shown after a lookup.</p>
</section>

<%- include('partials/foot') %>