diff --git a/modules/backend/classes/FormField.php b/modules/backend/classes/FormField.php index ad3bdacf0..82e3d92cc 100644 --- a/modules/backend/classes/FormField.php +++ b/modules/backend/classes/FormField.php @@ -366,12 +366,31 @@ class FormField /** * Adds any circumstantial attributes to the field based on other - * settings, such as the 'trigger' option. + * settings, such as the 'disabled' option. * @param array $attributes * @param string $position * @return array */ protected function filterAttributes($attributes, $position = 'field') + { + $position = strtolower($position); + + $attributes = $this->filterTriggerAttributes($attributes, $position); + + if ($position == 'field' && $this->disabled) { + $attributes = $attributes + ['disabled' => 'disabled']; + } + + return $attributes; + } + + /** + * Adds attribues used specifically by the TriggerAPI + * @param array $attributes + * @param string $position + * @return array + */ + protected function filterTriggerAttributes($attributes, $position = 'field') { if (!$this->trigger || !is_array($this->trigger)) return $attributes;