When I link a "Webform" to a node, "Settings" is displayed.

I do not want this setting to be displayed to users who create a node.

How is the hidden ?

CommentFileSizeAuthor
Capture du 2018-02-07 18-23-32.png19.85 KBzenimagine

Comments

zenimagine created an issue. See original summary.

jrockowitz’s picture

Status: Active » Fixed

You have to use a custom hook/module.

/**
 * Implements hook_field_widget_form_alter()
 */
function CUSTOM_MODULE_field_widget_form_alter(&$element, \Drupal\Core\Form\FormStateInterface $form_state, $context) {
  $field_definition = $context['items']->getFieldDefinition();
  if ($field_definition->getType() === 'webform') {
    $element['settings']['status']['#access'] = FALSE;
    $element['settings']['scheduled']['#access'] = FALSE;
  }
}

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.