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 CiviEvent (Moderator: Yashodha Chaku) »
  • Custom profiles and conditional fields
Pages: [1]

Author Topic: Custom profiles and conditional fields  (Read 1456 times)

jzimmer12

  • Guest
Custom profiles and conditional fields
July 14, 2010, 12:23:01 pm
Hello,

I am working on updating our event registration portal and I have a need to have a conditional field setup. Basically, if a user checks this box, then fields that are not relevant to them are disabled.

I have so far copied the Register.tpl file to the custom templates folder, but I am at a complete loss as to where to go next to accomplish this.

Any help would be greatly appreciated.

thank you.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom profiles and conditional fields
July 19, 2010, 04:28:36 am
Your current approach is correct, conditional display can be possible with template customization (i.e. using javascript / css ).

Kurund
Found this reply helpful? Support CiviCRM

jzimmer12

  • Guest
Re: Custom profiles and conditional fields
July 28, 2010, 06:43:39 am
Thanks for the reply. I guess where I am at a loss is with the custom template file. Should I erase what's in it and then just call the various fields based on their ID or how do I go about getting the fields I want in there.

Thanks for the help.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom profiles and conditional fields
July 28, 2010, 06:58:58 am
Quote
Should I erase what's in it and then just call the various fields based on their ID or how do I go about getting the fields I want in there.
Nope you should not erase anything, just add javascript code to remove elements that you don't want.

Kurund
Found this reply helpful? Support CiviCRM

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom profiles and conditional fields
July 28, 2010, 11:57:07 am
If you haven't read this section of the online book - might help:
http://en.flossmanuals.net/CiviCRM/DevelopTemplates

It's very helpful to enable debugging (Administer > Global Settings > Debugging) and then add this to any CiviCRM URL in order to get a pop-up with a listing of all the variables available to that template: &smartyDebug=1
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Custom profiles and conditional fields

This forum was archived on 2017-11-26.