diff --git a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidElementBase.php b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidElementBase.php index 5316aabc..6187ba30 100644 --- a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidElementBase.php +++ b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidElementBase.php @@ -31,6 +31,7 @@ public function getDefaultProperties() { 'minlength' => '', 'maxlength' => '', 'placeholder' => '', + 'readonly' => '', ]; return $properties; @@ -110,9 +111,9 @@ public function form(array $form, FormStateInterface $form_state) { // @see \Drupal\webform\Plugin\WebformElement\WebformEntityReferenceTrait::form $element_properties = $form_state->get('element_properties'); - // If element is new, set disabled by default. + // If element is new, set readonly by default. if (empty($element_properties['title'])) { - $form['form']['disabled']['#value'] = TRUE; + $form['form']['readonly']['#value'] = TRUE; } // Here you can define and alter a webform element's properties UI.