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) »
  • Remove 'Priority' from Activity forms
Pages: [1]

Author Topic: Remove 'Priority' from Activity forms  (Read 745 times)

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Remove 'Priority' from Activity forms
January 18, 2012, 05:43:50 am
Hi!

I've been adapting Civicrm for a local care home network and it's working really well. Just trying to tidy up a few things to simplify it for staff use.

In the 'New Activity' form there's an option to list 'Priority' which I would like to remove - I can do this by deleting the priority lines in administrator/components/com_civicrm/civicrm/templates/CRM/Activity/Forms/Activity.tpl

             </tr>
             <tr class="crm-activity-form-block-priority_id">
                <td class="label">{$form.priority_id.label}</td><td class="view-value">{$form.priority_id.html}</td>
             </tr>


...BUT even though it vanishes from the form it still exerts power as a 'required field' and I can't figure out where to silence it!! Screen grab attached.

Anyone have any ideas where I should look?

Cheers in advance if anyone can help.

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Re: Remove 'Priority' from Activity forms
January 18, 2012, 06:54:29 am
OK. Bit embarrassed. Figured it out!

For anyone else who might be trying a similar thing, I found the place where fields are set up as required or not...

administrator/components/com_civicrm/civicrm/CRM/Activity/Form/Activity.php

Edited the following changing 'True' to 'False' at the end:

                  'priority_id'               =>  array( 'type'       => 'select',
                                                         'label'      => ts('Priority'),
                                                         'attributes' =>
                                                         CRM_Core_PseudoConstant::priority( ),
                                                         'required'   => false,


Phew.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Remove 'Priority' from Activity forms

This forum was archived on 2017-11-26.