Drupal 7 自定义模块 |在设置页面中创建一个调用自定义函数的按钮
我创建了一个自定义模块,它有自己的设置页面,管理员可以在其中设置某些参数(单选按钮、输入字段和下拉列表)。
我正在寻找一种在表单中创建一个执行自定义功能的按钮的方法。 (例如:就像管理页面中的“清除所有缓存”按钮一样。)
创建此内容的最简单或最好的方法是什么?
提前致以亲切的问候和感谢!
I've created a custom module with it's own settings page where the administrator can set certain parameters (radio buttons, input fields and dropdown).
I'm looking for a way to create a button in the form that will perform a custom function.
(Example: Like the 'clear all caches' button in the admin page.)
What's the easiest or best way to create this?
Kind regards and thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
表单上的每个不同按钮都可以通过为其分配
#submit
属性:每次单击按钮时,只会运行指定的提交函数。
Each different button on your form can perform a different function by assigning it the
#submit
property:Only the specified submit function will run for each button click.