2

Many of our subscribers have informed us of the problem that they sign our petition, and then when other household members go to sign the same petition (e.g. particularly grandparents who don't have their own computer) they are unable to. I understand that clearing the cookie cache of the browser and thereby killing the sessionid or else opening a private window would be a work-a-round, but I'd like to just not have the problem. Can anyone point me to which file in the source code performs this check? And, as an aside, what do DAO and BAO mean? How civicrm works is really a mystery to me...

  • 3
    Hi Andrew, and welcome. I haven't worked much with petitions to date, but here is a good starting point on DAO and BAO for CiviCRM: docs.civicrm.org/dev/en/master/core/architecture/…. – Eli Lisseck Jun 15 '17 at 16:55
  • Thanks for that information. Looks like a lot to get my head around! I guess I could have searched it out. I don't think it was so well documented the last time I looked for it (possibly 5 years ago). – Andrew Ray Jun 15 '17 at 17:12
  • 2
    @AndrewRay It wasn't! And in fact today is an all-day documentation sprint to improve the developer docs, so it's a good day to ask documentation questions in the ~documentation channel on chat.civicrm.org. – Jon G - Megaphone Tech Jun 15 '17 at 18:16
4

The code in question is in <civiroot>/CRM/Campaign/Form/Petition/Signature.php. You're looking for the redirectIfSigned method, most likely.

| improve this answer | |
  • That was the right file. :-) Actually, line 282-290, which checks for the cookies signed_ and confirmed_ I commented out. I ended up leaving the two lines about redirectIfSigned alone-- they seem like they don't matter since I have the petition profile set to create duplicate contacts for now. – Andrew Ray Jun 16 '17 at 6:30
4

What CMS are you using? If Drupal you could do a webform for your petition which would have all of the basic functionality of Civi petitions plus a lot more configurability. It would definitely let you change this setting.

| improve this answer | |
  • I am using Drupal. I'll look in to webforms. I have to admit that I use Drupal for CiviCRM but our organizations main webpage is separate, using TypesetterCMS, so I'm not so deeply familiar with Drupal functionality. I have thought about combining the two websites, as it would look a lot better, but migrating will be a big project for me. – Andrew Ray Jun 16 '17 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.