public static function N1edFileField::preRenderWidget in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2
Pre-renders widget form.
File
- src/
N1edFileField.php, line 118
Class
Namespace
Drupal\n1edCode
public static function preRenderWidget($element) {
// Hide elements if there is already an uploaded file.
if (!empty($element['#value']['fids'])) {
$element['n1ed_paths']['#access'] = false;
}
return $element;
}