1. drupal
    1. 8
    2. 7
8 – 7 filter_form_access_denied($element)

#pre_render callback for #type 'text_format' to hide field value from prying eyes.

To not break form processing and previews if a user does not have access to a stored text format, the expanded form elements in filter_process_format() are forced to take over the stored #default_values for 'value' and 'format'. However, to prevent the unfiltered, original #value from being displayed to the user, we replace it with a friendly notice here.

See also



modules/filter/filter.module, line 944

function filter_form_access_denied($element) {
  $element['#value'] = t('This field has been disabled because you do not have sufficient permissions to edit it.');
  return $element;