This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Does anyone know how to do this as using disabled: true
in the fields.yaml
doesn't seem to work? Maybe this is a bug that needs reporting?
I have temporarily managed this with some javascript in the controller, but would like to know if the disabled
property is actually working
Hi! Unfortunately the documentation made a mistake! I also tried to understand why it is not working. After careful consideration of some plugins, I found that you need to add "attributes" and put there "disabled"
fields:
campaign:
label: Campaign
attributes:
disabled: true
Last updated
Also note that in the FormField this looks like this:
$field->attributes['fields']['disabled' => true];
To disable, setting to false will not work. It has to be removed completely, as this is just the way the disabled attribute currently works.
Also setting disabled does not work for some types of fields (field widgets).
Last updated
1-7 of 7