CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Using Petition screens for "signing up" rather than "signatures" (with patch)
Pages: [1]

Author Topic: Using Petition screens for "signing up" rather than "signatures" (with patch)  (Read 2083 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Using Petition screens for "signing up" rather than "signatures" (with patch)
August 04, 2011, 12:21:28 am
As implemented, Petitions require a "signature". But Petitions can be used in cases when people want to "sign up" (less formal than supplying a signature).

For example, if the campaign is "Educate our members about X" a petition can be created for "Members interested in learning about X" - in this case, "signing" the petition means "I'm interested in learning about X".

I've attached a patch file showing how we have tailored the Petition screens to allow people to "sign up" rather than "sign this petition". I'm not entirely happy with the wording, but I think the patch demonstrates that making the text more generic only requires a few textual changes. It would also be nice to parameterise the text of the "Sign the Petition" button, rather than hacking the code.

Ken

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
August 04, 2011, 03:48:31 am
Hi,

Glad to see you are using petition for something different than intended at the start and push it further.

Wondering if by having a more generic wording we don't dilute the campaigning initial goal (ie. "click somewhere to confirm some action" is less punchy than "if you don't sign now, the baby seal is going to die").

This being said, we tend to customise the templates for a petition anyway and the default text isn't that punchy.

Agree that the text for the button should be easier to change. Can you check if we can modify the text from within the template (to avoid having to hack the php)?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
August 08, 2011, 03:30:45 am
Xavier,

I don't believe the text is set in the template, and I'm not sure how to modify it

Ken

slamorte

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 14.14
  • PHP version: 5.4.4-14+deb7u8
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
March 08, 2014, 07:40:58 pm
Sorry to revive a dead thread, but I've been unable to find this answered anywhere else.

Given that CiviPetition seems to be the only way to create an online survey, is there really no way to change the "Sign the Petition" button text without hacking the CiviCRM TPLs?

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
March 09, 2014, 03:19:07 am
tpl are made to be hacked - you can override the default templates, so the process is just to create a custom templates directory, configure CiviCRM to know where it is, copy the relevant tpl into position and modify it

http://book.civicrm.org/developer/current/techniques/templates/

Another route (if you're on Drupal) is webform + webform_civicrm, which gives you a lot of customisation options. At Fuzion we use that for many clients when it comes to providing flexible forms for signup, onboarding, petitions etc.

Hope that helps!
@xurizaemon ● www.fuzion.co.nz

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
March 11, 2014, 02:59:51 pm
The other way around this is to use Word Replacements.

Administer -> Customize -> Word Replacements.

Put in Sign the Petition, check the Enabled box and the Exact Match box and add the text you want instead.


slamorte

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 14.14
  • PHP version: 5.4.4-14+deb7u8
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
March 12, 2014, 03:27:14 pm
Thanks all! I almost went with Word Replacements, but in the end found I could easily hack it with a little JavaScript. I edited my .info to activate my /js folder, edited my scripts.js, added
Code: [Select]
$("#_qf_Signature_next-bottom").attr('value', 'Submit Survey'); and I was good to go. =)

Still... needs to be written into the Civi system really. "Button Text" should be a field in the Petition edit page at some point.

Editing the tpl is another path... but i would guess the vast majority of CiviCRM users do not hack PHP.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Using Petition screens for "signing up" rather than "signatures" (with patch)
March 14, 2014, 05:21:24 am
"Hacking PHP" is best done by adding a hook, but you have to test on every new release. If there is no suitable hook you can change Core, but then you have to potentially change the code on each new release.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Using Petition screens for "signing up" rather than "signatures" (with patch)

This forum was archived on 2017-11-26.