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