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) »
  • Sector / Interest groups »
  • Civic engagement tools (Moderators: Michael McAndrew, avaguilar) »
  • Survey: request to add new fields
Pages: [1]

Author Topic: Survey: request to add new fields  (Read 3974 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Survey: request to add new fields
September 06, 2010, 01:40:59 pm
Hi,

A petition is implemented as a kind of survey. The default fields are almost good enough, but we have a few that we need, and a few more that'd be nice to have. When I mean field, I mean "place to store that on a per survey basis".

NEED IT:

1) email: rationale, we need it as the sender of the "you need to click here to confirm your signature" and "thank you" emails (and we need different for different surveys)

2) petition page url: rationale, a petition has a website, or at least a page on a website, we want to display it on the thank you page, and use it to create the "FB like" & "tweet" buttons

WOULD BE NICE (but can almost leave with it)

1) Custom message for the confirmation/thank you
So we can put a special message, the latest news, a specific request for donation...
- workaround: use the instruction for volunteer field (that we don't need)

2) being able to set a petition to "private" (ie. only existing contacts can sign)

What should we put as new fields on survey, do without, use an existing field/table .... ?



-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Survey: request to add new fields
September 07, 2010, 12:52:32 pm
Decisions on the chat with lobo now:

1) adding a loc_id field (FK on civicrm_loc_block )

2) adding 2 websites website_id and website_2_id FK on civicrm_website

And in less than 30 joins, you can get the email and website of the survey ;)

CRM/Event/Form/ManageEvent/Location.php as an example of locblock



-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Survey: request to add new fields
September 07, 2010, 01:58:46 pm
And about the custom bits of html in the templates

http://svn.civicrm.org/sfschool/trunk/templates/SFS/common/footer.tpl

and

http://drupal.demo.civicrm.org/civicrm/admin/tplstrings?reset=1

suggested improvment:

Code: [Select]
<div class="footer" id="civicrm-footer">
{crmDBTpl context='school family config' name='footer text'}
  If you want to change any of your (or your child's) Personal Information (name, email, phone), please send an email to <a href="mailto:update@sfschool.org">update@sfschool.org</a>
{/crmDBTpl}
</div>


end of the braindump, good night everyone.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Survey: request to add new fields
September 14, 2010, 12:52:52 am
Actually, realise that we need more fields that that.

1) How complicated is it to add custom fields on a survey ?

2) in the meantime, I not too ugly workaround: I include a "footer.tpl", and override the footer.tpl with my custom template that
- contains a few lines of php to fetch the related drupal node "petition" (that contains a cck with the civicrm petition id )
- and display the title/url, whatever

in short, I use the drupal associated node as a way to store custom fields.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Survey: request to add new fields
September 14, 2010, 06:39:59 am

1. if i had to guess its a 10-20 hour project. but it definitely would help survey signficantly and help adapt it to different use cases (like petition, voter registration etc)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Sector / Interest groups »
  • Civic engagement tools (Moderators: Michael McAndrew, avaguilar) »
  • Survey: request to add new fields

This forum was archived on 2017-11-26.