Make certificate fields conditional

Created on 25 February 2025, about 1 month ago

Problem/Motivation

Certificate related fields should be only visible if the field "Use certificate for login (use_cert)" is set to "Use certificate"

Proposed resolution

Make $form['plugin_settings']['oauth2_client']['cert_file_path'] and $form['plugin_settings']['oauth2_client']['cert_file'] fields conditional with '#states' settings:

'#states' => [
  'visible' => [
    ':input[name="use_cert"]' => ['value' => '1'],
  ],
],
Feature request
Status

Active

Version

1.0

Component

User interface

Created by

🇪🇸Spain phergo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024