Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-21 09:18:09

phual
Member
From: UK
Registered: 2008-02-19
Posts: 26
Website

Help creating simple petition

I’ve got a requirement for a one off petition for my site. After having a look at what’s available, I decided that a dedicated program was overkill and figured that a simple petition using modified comment would be easier. Well, I’m struggling.

I figured that the answer would be to use an alternate set of comment forms showing simply the commenter’s name (and email address to help prevent double entries). However, I’m struggling to wrap my head around how to call the separate form for creating the specialist comments, especially as it mixes in with a section that uses standard comments.

A quick and dirty attempt at the new forms (which probably have errors in them as I’ve not been able to test them) are shown bellow:

petition_form (type: comment)

<txp:comments_error wraptag="ul" break="li" />
<p>Your name will be available to visitors of the site, but your email will be kept private.</p>
<div id="enter_comment">
<p>Name
   <span class="comment_data">
      <txp:comment_name_input />
      <txp:comment_remember /> 
   </span>
</p>
<p>Email
   <span class="comment_data">
      <txp:comment_email_input />
   </span>
</p>
</div> <!-- close id="enter_comment" -->

petition_display (type: article)

<h3>
   <txp:comments_invite
        textonly="1"
        showalways="1"
        showcount="1" />
</h3>

<txp:comments />

<txp:if_comments_preview>
<div id="cpreview">
<txp:comments_preview />
</div>
</txp:if_comments_preview>

<txp:if_comments_allowed>
<txp:comments_form />
<txp:else />
<p>This petition is closed.</p>
</txp:if_comments_allowed>

petition (type: comment)

<p><txp:comment_name />
<span class="comment_time">· <txp:comment_time /> ·</span>
</p>

<hr />

Can anyone shed any light on how to use them with an article?

Stuart

Offline

Board footer

Powered by FluxBB