Forum

Thread tagged as: Question, Addons

Perch and a petition form

Hi Guys,

Wondering whether either the members app or form app would allow for visits to sign their name to a petition type form in order to show their support for something.

The tricky part (at least to me) would be the ability to show the list of visitors who sign the petition as a list displayed on the site.

Could either of those apps do that? Any thoughts or guidance on this would be much appreciated.

Regards, Monty

Monty Lewis

Monty Lewis 2 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How about the Comments app?

thanks, forgot about the comments app. I'll take a look.

hmmm. With the comments app I can add a checkbox to a comments form. Such as:

<perch:input type="checkbox" id="commentVisible" name="visible" value="Visible"/>

I see it on the form. Should I be able to see the field and value on the admin modify comments screen?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You should see it on the comment detail form.

Shoot. I don't. Here's the full comment form and I don't see any errors there.

                            <!-- START CONTACT FORM -->
                            <perch:form role="form" id="comment" class="contactForm" method="post" app="perch_comments">
                                <!-- NAME -->
                                <div class="col-lg-6 col-xs-6">
                                    <div class="form-group">
                                       <perch:input type="text" id="commentName" required="true" label="Name" antispam="name" class="form form-control requiretop" placeholder="Full name" />
                                       <perch:error for="commentName" type="required">Required</perch:error>
                                    </div>
                                </div>

                                <!-- EMAIL -->
                                <div class="col-lg-6 col-xs-6">
                                    <div class="form-group">
                                        <perch:input type="email" id="commentEmail" class="form form-control email requiretop" placeholder="Email" label="Email" antispam="email"/>
                                        <perch:error for="commentEmail" type="required">Email address is required</perch:error>
                                        <perch:error for="commentEmail" type="format">Please check format of address</perch:error>
                                     </div>
                                </div>

                                <!-- SUBJECT -->
                                <div class="col-lg-12 col-xs-12">
                                    <div class="form-group">
                                        <perch:input type="text" id="commentCity" class="form form-control requiretop" placeholder="City" name="city"/>
                                    </div>
                                </div>

                                <!-- MESSAGE -->
                                <div class="col-lg-12 col-xs-12">
                                    <div class="form-group">

                                        <perch:input type="checkbox" id="commentVisible" name="visible" value="Visible" checked="checked" />&nbsp;Make my signature visible.<br>
                                        <perch:input type="textarea" rows="3" id="commentHTML" class="form textarea form-control requiretop" placeholder="Comment (optional)" required="false" />
                                        <perch:input type="checkbox" id="commentAlertMe" name="alertme" value="Alert Me"/>&nbsp;Recontact me with updates. (You can opt out at any time)<br>

                                    </div>
                                </div>

                                <!-- BUTTON SUBMIT -->
  <perch:input type="hidden" id="parentID" value="<perch:comments id="parentID" />" />
  <perch:input type="hidden" id="parentTitle" value="<perch:comments id="parentTitle" />" />
  <perch:input type="submit" id="submitComment" value="Sign the Petition" class="btn btn-large specsend" />

 <perch:success>
<p>Thank you. Your name has been added to our petition.</p>

</perch:success>

                            </perch:form>
                            <!-- END CONTACT FORM -->

Also, I can't get the checked="checked" to work for me.

I'm using comments 1.1

Thanks for your help.

Monty

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, I'll log it.