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 CiviCase (Moderator: Dave Greenberg) »
  • Custom Data ACL To View but not Edit the fields
Pages: [1]

Author Topic: Custom Data ACL To View but not Edit the fields  (Read 1042 times)

wehitch

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7 and Joomla 2.5
  • MySQL version: 5.1.69
  • PHP version: 5.3.3
Custom Data ACL To View but not Edit the fields
July 24, 2013, 04:25:21 pm
Hi to all!
I have created multiple custom data / fields for Civicase.
I have one group of fields that is meant to be filled only by the administrator.. So that the simple registered members can see those fields and their values.
For example. I submit a new Open Case for a car accident. Then the administrator log in and fill up a group of fields.. Cost.. Estimated time for repair of the car etc.
Is it possible to restrict the editing of those fields for me and only view them?
I have set up the ACL Roles but the view function allow me to edit the fields.
I hope i explained it good and that someone has a fix.
Thank in advance, i will be grateful if i can fix that soon because the site is live.   

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data ACL To View but not Edit the fields
July 24, 2013, 06:36:19 pm
This is currently not possible w/o implementing custom code in a module or extension. Check the online book : developer guide and wiki to get started.
Protect your investment in CiviCRM by  becoming a Member!

wehitch

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7 and Joomla 2.5
  • MySQL version: 5.1.69
  • PHP version: 5.3.3
Re: Custom Data ACL To View but not Edit the fields
July 24, 2013, 11:29:39 pm
Thank for your response.. I started reading the book.. And i thought of one way to do that... If i made all of those fields "View Only" and then Create identical fields hidden from the registered users.. Could i print the values of the hidden fields to the view only fields?
And if that is possible could someone give me a hint? Because my skills are pretty basic in development.. Lets say i am still a baby :p
Thanks in advance..

wehitch

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7 and Joomla 2.5
  • MySQL version: 5.1.69
  • PHP version: 5.3.3
{Solved}Re: Custom Data ACL To View but not Edit the fields
July 25, 2013, 01:55:57 am
Ok i fixed it... Not with the best possible way... but still i will do what i want..
I added a unique id to every edit button. One for administrators and one for the others

Code: [Select]
{if call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities')}
      <div id="edit_{$customGroupId}_admin">
      {else}
       <div id="edit_{$customGroupId}_noadmin">
       {/if}

and then i added display:none; from css..
In case anyone need the samething..

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • Custom Data ACL To View but not Edit the fields

This forum was archived on 2017-11-26.