← back to Petitionyour
views/new.ejs
46 lines
<%- include('partials/head', { title: 'Start a Petition', description: 'Start a free petition and rally support for a cause aimed at your local, state, or federal representatives.' }) %>
<section class="wrap narrow">
<h1>Start a Petition</h1>
<p class="lede">Be specific about who you're asking and what you want them to do — petitions with a clear target and a clear ask get taken seriously.</p>
<% if (error) { %>
<div class="alert alert-error"><%= error %></div>
<% } %>
<form method="POST" action="/petitions" class="stack-form">
<label for="title">Petition title *</label>
<input type="text" id="title" name="title" required maxlength="140" placeholder="e.g. Repave Elm Street Before Winter" value="<%= form.title || '' %>">
<label for="description">Description *</label>
<textarea id="description" name="description" required rows="6" placeholder="Explain the issue, why it matters, and exactly what you're asking for."><%= form.description || '' %></textarea>
<label for="target">Who is this addressed to? *</label>
<input type="text" id="target" name="target" required maxlength="140" placeholder="e.g. City Council, State Senator Jane Doe, U.S. House of Representatives" value="<%= form.target || '' %>">
<label for="targetType">Level of government (optional)</label>
<select id="targetType" name="targetType">
<option value="">Not specified</option>
<option value="City Council">City / Local</option>
<option value="State Legislature">State</option>
<option value="Federal / Congress">Federal / Congress</option>
<option value="Other">Other / Organization</option>
</select>
<label for="category">Category</label>
<select id="category" name="category">
<% categories.forEach(function(c){ %>
<option value="<%= c %>" <%= form.category === c ? 'selected' : '' %>><%= c %></option>
<% }) %>
</select>
<label for="creatorName">Your name or organization (optional, shown publicly as the starter)</label>
<input type="text" id="creatorName" name="creatorName" maxlength="80" placeholder="e.g. Jane D. or River Basin Watch" value="<%= form.creatorName || '' %>">
<button type="submit" class="btn btn-primary btn-wide">Publish Petition</button>
<p class="fine-print">Your petition will be public immediately. There's no review queue — please keep it accurate and civil.</p>
</form>
</section>
<%- include('partials/foot') %>