function filter_form_access_denied
filter_form_access_denied($element)
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
File
- modules/filter/filter.module, line 991
- Framework for handling the filtering of content.
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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!filter!filter.module/function/filter_form_access_denied/7.x