function filter_form_access_denied
Same name in other branches
- 8.9.x core/modules/filter/filter.module \filter_form_access_denied()
Render API callback: Hides the field value of 'text_format' elements.
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
1 string reference to 'filter_form_access_denied'
- filter_process_format in modules/
filter/ filter.module - Expands an element into a base element with text format selector attached.
File
-
modules/
filter/ filter.module, line 993
Code
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.