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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • trouble with custom standard edit contact form
Pages: [1]

Author Topic: trouble with custom standard edit contact form  (Read 1269 times)

aeszq

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 0
trouble with custom standard edit contact form
April 01, 2009, 07:14:42 pm
Hi guys,
I'm trying to customize the standard "edit contact" form.

I created a custom data group called "other comm privacy", which contains checkbox of "Do not SMS","Do not instant message".
And I wanna move these checkboxes beneath the standard "Communication Preferences - Privacy".
I noticed that my custom data group is handle by <custom templates>\CRM\custom\form\customData.tpl, and "Communicaion Preference" is handled by \CRM\contact\Form\CommPrefs.tpl.  And these two are included by \CRM\contact\Form\edit.tpl
So I tried copying some modifed code from customData.tpl to CommPrefs. but it didn't work. I tried the same method when I was customizing "view contact" form, it worked well.

It seems that the array item assigned to tpl are not shared among these tpl file. I noticed that it says {* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} in the smarty template file. I guess there might be something to do with the "controller". But don't really know what "controller" is.

Can anybody help? Thanks a lot.








aeszq

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 0
Re: trouble with custom standard edit contact form
April 01, 2009, 08:57:49 pm
I also find that the page source does not contain custom data block code. but it has javascript function which output the html source for custom data.

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: trouble with custom standard edit contact form
April 02, 2009, 07:02:46 am

this will not work, since in the edit form the custom data is loaded via ajax (in the view form it is loaded inline)

i dont have a good workaround for your issue currently that does not involve hacking the code :(

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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • trouble with custom standard edit contact form

This forum was archived on 2017-11-26.