VTiger 中的 smarty 电子邮件模板修改
我对 VTiger CRM 很陌生,但我对 PHP/mySQL、CSS 有很好的了解。我在 .\Smarty\templates\ComposeEmail.tpl
中添加一个选择框,例如:
<table>
<tr>
<td class="mailSubHeader">Status:</td>
<td class="mailSubHeader">
<select name="somename">
<option value="">--Please Select--</option>
<option value="Pending">Pending</option>
<option value="Complete">Complete</option>
</select>
</td>
<td class="mailSubHeader"> </td>
</tr>
</table>
当有人提交时,如何存储所选项目的信息(在数据库表中)?
I am quite new in VTiger CRM but I do have a good knowledge at PHP/mySQL, CSS . I add a select box in .\Smarty\templates\ComposeEmail.tpl
like:
<table>
<tr>
<td class="mailSubHeader">Status:</td>
<td class="mailSubHeader">
<select name="somename">
<option value="">--Please Select--</option>
<option value="Pending">Pending</option>
<option value="Complete">Complete</option>
</select>
</td>
<td class="mailSubHeader"> </td>
</tr>
</table>
how can i store the information(in database table) of the selected item when someone submit it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,这是一个有趣的问题..据我所知,您可以将变量从 PHP 传递到 .tpl,但我不确定您是否可以做到这一点反之亦然。
ComposeEmail.tpl
由modules/Email/EditView.php 调用。我知道要将变量传递给模板,您可以使用:不确定它是否可以以相反的方式工作。我的猜测是您可以在模板文件中调用 PHP 脚本,它将执行数据库存储。该脚本需要调用全局 $adb;多变的。然后你可以编写类似于这样的 SQL 语句:
希望这有帮助吗?
Hmm, that's an interesting question.. As far as I know, you can pass variables to the .tpl from PHP, but I'm not sure if you can do it the other way around.
The
ComposeEmail.tpl
is called by modules/Email/EditView.php. I know to pass variables to the template, you would use:Not sure if it works the other way around though.. My guess is you can call a PHP script in the template file, that will do the database storage. The script will need to call the global $adb; variable. Then you can write a SQL statement similar to this:
Hope this helps?