包括结果以及同一页面上的表格,并使用drupal来显示结果 [英] Including results along with a form on the same page and theming the results using drupal

查看:152
本文介绍了包括结果以及同一页面上的表格,并使用drupal来显示结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地在drupal中创建了一个页面,在同一页面上显示一个表单和结果。该表单的作用就像筛选结果。结果包括一堆HTML,其中包括通过Chart API模块的Google图表( http://drupal.org/project /图表)。结果通过标记表单元素包含在表单中(来自eaton的评论:)。

I have successfully created a page in drupal that displays a form and results on the same page. The form acts like a filter of the results. The results include a bunch of html that includes google charts via the Chart API module (http://drupal.org/project/chart). The results are included in the form via a markup form element (Got that from eaton's comments here: Drupal: How to Render Results of Form on Same Page as Form).

由于我可以' t访问表单结果超出了表单API的范围(例如,如页面回调函数),我似乎无法真正主题的结果。有没有办法将复杂的结果放在与表单相同的页面上,并使结果成为主题?另外,是否有更好的drupal方式在同一页面上显示表单结果?

Since I can't access the form results outside of the scope of the form API (e.g. like the page callback function), I can't seem to really theme the results. Is there a way to place complex results on the same page as a form and make the results themeable? Also, is there a better drupal way to display form results on the same page?

推荐答案

我对您的解决方案感兴趣为了这。我们使用视图和曝光过滤器做了非常相似的声音。观看结果和形式都是非常直接的/标准类型的事情要做的drupal。示例:views-exposed-form-form_name.tpl.php和views-view-view_name.tpl.php。表单也可以更改查看hook_form_alter。

I'd be interested in your solution for this. We did very similar sounding things using Views and Exposed Filters. Theming both the results of the view and the form were very straight forward/standard types of things to do in drupal. Example: views-exposed-form-form_name.tpl.php and views-view-view_name.tpl.php. The form is also changeable view the hook_form_alter.

这篇关于包括结果以及同一页面上的表格,并使用drupal来显示结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆