1

I want to set up a customer´s private recording system, where the customer can record his private issues. This record cannot be changed after one hour. The record includes time,episode and my comments. I used "field collection" module to set up the record first, then use "edit limit" module to limit the edit time-everything works fine but I found after one hour, though the customer cannot use the "edit" tab for the whole node, he can still click a "edit" link below each field (time, episode, etc.). Is there anyway to disable the "edit" link for each field after one hour as well?

1

You can hide at all links to separately edit/delete field collections values, go to Structure » Content types » YOUR_CONTENT_TYPE » Manage display, click to field collection settings cogwheel and clear fields.
enter image description here

Also you have to forbid an access to edit/delete by direct link, place in your custom module:

/**
 * Implements hook_menu_alter().
 */
function yourmodule_menu_alter(&$items) {
  $path = 'field-collection/' . strtr('your_field_name', array('_' => '-'));
  $items[$path . '/%/edit']['access callback'] = FALSE;
  $items[$path . '/%/delete']['access callback'] = FALSE;
  $items[$path . '/add/*/*']['access callback'] = FALSE;
}

Don't forget to clear cache.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.