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) »
  • custom field set color if not default value
Pages: [1]

Author Topic: custom field set color if not default value  (Read 315 times)

smksites

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.7
  • CMS version: Drupal
  • MySQL version: 5.5
  • PHP version: 5.4
custom field set color if not default value
August 24, 2014, 05:48:55 pm
Just wondering if anyone has come across this requirement.

There is a group of custom fields and I want to set the text color of the title if the custom field does not match the default value for the custom field on the view screen.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: custom field set color if not default value
August 25, 2014, 12:05:38 am
You would need to code this yourself with some jQuery.
You would also need some way to pass the default value to javascript. If it's just a small number of fields you could hard-code this into your js. Or else use a form build hook to do something like $field->setAttribute('data-default', $default);
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • custom field set color if not default value

This forum was archived on 2017-11-26.