Hey,
I am currently facing an issue that the media library form widget could not be disabled.
For all my other fields I can use something like:
$form['field_123']['#disabled'] = TRUE;
within a hook_form_alter to disable them, for the media library widget this seems not to work.
Attached you can find a screenshot from my testsuite where all fields are disabled beside the media library field.
| Comment | File | Size | Author |
|---|---|---|---|
| screencapture-import-localhost-de-node-9-edit-2019-04-23-13_22_25.png | 479.28 KB | sgurlt |
Comments
Comment #5
ludo.rI confirm the bug, and it doesn't impact media field only.
Steps to reproduce
mediaandmedia_librarymodulesfield_mediato the page content type$form['body']['#disabled'] = TRUE; $form['field_media']['#disabled'] = TRUE;