Inserting a form into a block in Drupal?

后端 未结 3 1914
余生分开走
余生分开走 2021-02-02 13:35

Is there any command or method that I can use to insert the contents of a form (e.g. the user registration form) into a block?

3条回答
  •  一向
    一向 (楼主)
    2021-02-02 14:18

    drupal_get_form($form_id) - put it in a module's hook_block ($op=='view') or even... shudder... inside a block with PHP filter on.

    You need to find the form id first - look for a hidden input with the name form_id within the form. Its value should be the the form id.

    Also, you could simply use the Form Block module.

提交回复
热议问题