Author Topic: Make activity fields required?  (Read 246 times)

Offline Tiffani Chin

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.2 (testing 4.3)
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Make activity fields required?
« on: May 01, 2012, 02:05:26 pm »
Does anyone know a good way to make activity fields (specifically "status" and "details") required?

I've looked through the UI and through the code to see if there's a simple setting I can change but I don't see one.  Am I missing it?

Or, does anyone have any code suggestions?  I'm not a developer but I'm getting better at applying small fixes here and there.

Thank you!

Offline demeritcowboy

  • Ask me questions
  • ****
  • Posts: 467
  • Karma: 36
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1
  • PHP version: Mix of 5.2 / 5.3, usually on Windows
Re: Make activity fields required?
« Reply #1 on: May 01, 2012, 08:24:47 pm »
You could try the buildForm hook, just not sure off the top of my head how easy it would be. Maybe $form->addRule()?

If you're ok with client-side validation and popping up a javascript box you could insert some jquery into the template, either through buildForm or with this technique http://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates