Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在正在使用 Drupal。是否可以将社区 webform 模块生成的表单包装在 div 中?任何主题方法或挂钩点来做到这一点?
您可以通过 hook_page_alter 在表单周围添加一个 div,例如:
function hook_page_alter(&$page) { // Add help text to the user login block. $page['content']['...']['form'] = array( '#prefix' => '<div>', '#suffix' => '</div>', ); }