“Drupal8表单构建元素(下拉列表)” 内容纲要 $form['example_select'] = [ '#type' => 'select', '#title' => $this->t('Select element'), '#options' => [ '1' => $this->t('One'), '2' => [ '2.1' => $this->t('Two point one'), '2.2' => $this->t('Two point two'), ], '3' => $this->t('Three'), ],]; 分享到:TwitterFacebook赞过:赞 正在加载…… 相关