表单过滤器中的原始 HTML

发布于 2024-09-06 14:02:11 字数 329 浏览 2 评论 0原文

在我的公司,我们开发了一个运动员管理解决方案,每个运动员都由管理员用户插入到应用程序中。对于所提到的解决方案,它使用了 symfony 管理生成器。

在第二次项目迭代中,客户的要求之一是使印刷的运动员名单更加清晰。为了实现这一目标,我们创建了适当的 CSS 样式,以便在用户选择浏览器打印选项时使用。

然而,运动员表单过滤器有一些无法正确呈现的 HTML 标签(symfony 小部件),即可能有多个选择的 select 标签(选择的选项不会出现在打印预览中)。

因此,我想知道是否可以直接在表单过滤器上插入原始 HTML(获取所选选项并将其转换为标签或纯文本),只有当用户选择打印选项时才可见。

At my company, we had developed a athletes management solution, were each athlete is inserted in the application by administrators users. For the referred solution, it was used the symfony admin generator.

On the second project iteration, one of the clients request was to turn the printed athletes list more legible. To accomplish that, we had created proper CSS styles, to be used when the user selects the browser print option.

However, the athletes form filter has some HTML tags (symfony widgets) whose do not render properly, namely, the select tag that has possible multiple choices (the select choices do not appear on the print preview).

So, I would to know if is possible to insert raw HTML directly on the form filter (get the selected options and convert them is labels or plain text), that will be only visible when the user selects the print option.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

燕归巢 2024-09-13 14:02:11

您可以放置​​一个自定义小部件来代替标准选择小部件,该小部件会添加您想要在打印时显示但默认情况下隐藏的值。然后您使用打印样式表向它们展示。

You could put a custom widget in place of the standard choice widget that adds in the values you want to be shown when printing but hidden with styles by default. Then you show them using your print style sheet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文