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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing Profile Form
Pages: [1]

Author Topic: Customizing Profile Form  (Read 957 times)

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Customizing Profile Form
March 23, 2009, 03:26:11 am
Goal: Create a custom profile page to collect additional information related to chapter membership. My client needs some advanced chapter support, and wants the members to be able to choose chapter membership when the profile is created.

I have read the documentation and created a directory structure for custom custom templates. The directory is in <homedir>/civicrm_custom/templates/ and it is outside of the webroot. I then entered the custom profile folder in the correct CiviCRM admin screen. It looks like the file I need to edit is templates/CRM/Profile/Page/Dynamic.tpl, although I also created a custom Page.tpl just to be sure I wasn't working on the wrong file. I tried to do something simple and added a line of text to the form just to verify that my template was being used and that line of text isn't showing up on the page, so I assume my custom template is not being used.

I have also searched through the forums to see if there are any gotchas, and didn't find anything that I haven't already tried.

One last note - this is a test system running under XAMPP on my Windows laptop, in case it makes a difference.

Is there anything I might have missed along the way?

Thanks for any direction you can provide.
Quint
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

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: Customizing Profile Form
March 23, 2009, 07:48:52 am

1. make sure that directory is readable by the web-server

2. try it on a different page to ensure u r not making any path mistakes

so edit CRM/Admin/Page/Admin.tpl and add a line at the top and see if it appears at q=civicrm/admin&reset=1

i was testing something related to this yesterday on 2.2 and it worked quite nicely. So pretty sure it does work in 2.1 :)

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

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Customizing Profile Form
March 23, 2009, 01:06:50 pm
I have the paths correct, and I was able to make customize a form by creating a copy and placing it in the correct folder. I think the problem I have is that the profile is embedded in the membership page under the contribute module. I can make changes to the contribution page by editing the correct .tpl files, but how can I do the following:

1. Modify a profile that is embedded in another form?
2. Have the chapter options show up with the profile only when the it is called from the Contribute module?

Or is my best bet to make a CiviChapter module and have it add its content to the Contribute page in the same way the membership profile is added to the page?

I am just getting my feet wet on developing for CiviCRM, and I appreciate your wisdom

Quint
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

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: Customizing Profile Form
March 23, 2009, 05:50:38 pm

ahh, profiles embedded in contribution/membership/event pages follow a different template. the template to modify for them is: CRM/UF/Form/Block.tpl

you can potentially figure out from where it is being called etc by examing the q variable in drupal and then modify it if needed. you can also check on some of the variables exposed via smartyDebug and then decide whether to include the chapter field or not

do get on IRC (http://embed.mibbit.com/?server=irc.freenode.net&channel=%23civicrm&forcePrompt=true) if you have more detailed questions 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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing Profile Form

This forum was archived on 2017-11-26.