【问题标题】:How to display a Custom Block in front page which contains the drupal_get_form(formid)如何在包含 drupal_get_form(formid) 的首页显示自定义块
【发布时间】:2012-09-25 10:58:09
【问题描述】:

嗨朋友们,我开发了一个自定义块,它从现有模块中获取表单,它适用于将表单 ID 作为参数的页面,但在其他页面中我收到此错误/警告。 call_user_func_array() 期望参数 1 是一个有效的回调,函数 'simplenews_subscription_manager_form' 在第 382 行的 /var/www/rajesh/ph/drupal/includes/form.inc 中找不到或无效的函数名称。

谁能告诉我在每一页或首页显示此表单的解决方案。

提前致谢, 拉杰什

【问题讨论】:

    标签: drupal


    【解决方案1】:

    这是一个基于 Drupal 的问题。请发帖drupal stackexchange.快速回复

    <?php
    module_load_include('inc', 'simplenews', 'simplenews.subscription');
    print drupal_get_form('simplenews_subscription_manager_form');
    ?>
    

    这样使用

    【讨论】:

    • 谢谢老兄,它正在工作,非常感谢,你能帮助如何在弹出窗口中获取它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-06
    • 1970-01-01
    相关资源
    最近更新 更多