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 CiviContribute (Moderator: Donald Lobo) »
  • Custom "new contribution" form
Pages: [1]

Author Topic: Custom "new contribution" form  (Read 469 times)

alanmc

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.7.0
  • CMS version: Drupal 7.41
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.5.31
Custom "new contribution" form
January 17, 2013, 04:03:14 am
I've been searching for several days trying to find what I thought would be a simple  edit to a standard installation of CiviCRM 4.2 with Drupal 7, for my church. What I want to do is edit the offline "new contribution" form to not display some of the optional fields that we won't use, like source and transaction ID, and include a custom field in the main edit area, instead of in a tab below.
I've followed the guide for creating a custom folder for a custom .tpl file, but the smarty language doesn't appear to be granular enough to do what I want. I've also tried a custom profile, but it doesn't appear that I can mix fields from individuals and contributions.
Any help will be greatly appreciated.
Al

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Custom "new contribution" form
January 17, 2013, 04:46:25 am
I don't know offhand where those fields are produced, but one idea is to use jQuery to hide them. I have done such. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

alanmc

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.7.0
  • CMS version: Drupal 7.41
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.5.31
Re: Custom "new contribution" form
January 17, 2013, 09:40:03 am
Thanks Hershel. I wouldn't know where to begin to use jQuery to hide fields. I can barely navigate through php template files in Drupal for minor edits. I can however follow directions, do you have an example that I might follow or a howto to point me to?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Custom "new contribution" form
January 17, 2013, 10:14:38 am
It's not so easy but see this page, including the comments http://civicrm.org/blogs/hershel/how-customize-civicrm-pages-jquery
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

alanmc

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.7.0
  • CMS version: Drupal 7.41
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.5.31
Re: Custom "new contribution" form
January 18, 2013, 03:31:45 am
Thanks Hershel!
Wow. I've been meaning to learn some jQuery, I had no idea how powerful it is! I've been able to hide the fields / rows that I won't be using, select an initial value for select boxes, and I believe I should be able to relocate a custom data field to the upper table area, instead of in a tab below. Cool.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Custom "new contribution" form

This forum was archived on 2017-11-26.