Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
来自Drupal9的反馈_Drupal - Fatal编程技术网

来自Drupal9的反馈

来自Drupal9的反馈,drupal,Drupal,我正在尝试更改Drupal9反馈表单的html,我尝试了这些选项,但没有结果 有什么想法吗 主题 /** * Implements hook_theme(). */ function mytheme_theme($existing, $type, $theme, $path) { return [ 'feedback' => [ 'render element' => 'form', ] ]; } 模板:contact-me

我正在尝试更改Drupal9反馈表单的html,我尝试了这些选项,但没有结果

有什么想法吗

主题

 /**
 * Implements hook_theme().
 */
function mytheme_theme($existing, $type, $theme, $path) {
  return [
      'feedback' => [
          'render element' => 'form',
      ]
  ];
}
模板:contact-message-feedback-form.html.twig

<div class="row">
    <div class="col-sm-6">
        {{ form.name }}
        {{ form.mail }}
        {{ form.subject }}
    </div>
    <div class="col-sm-6">
        {{ form.message }}
    </div>
</div>
<div class="row">
    <div class="col-sm-12">
        {{ form.captcha }}
        {{ form.actions }}
         Renders the rest of the form
        {{ form|without('name','mail','subject', 'message', 'actions', 'captcha') }}
    </div>
</div>

{{form.name}
{{form.mail}
{{form.subject}}
{{form.message}}
{{form.captcha}}
{{form.actions}}
渲染窗体的其余部分
{form |不带('name','mail','subject','message','actions','captcha')}