如何使用 PHP 在 drupal 表单 api 中限制表单提交
我有一个 drupal 表单,我想根据检查条件来显示错误消息,当显示错误消息时,这反过来应该限制表单提交。
我能够在 Javascript 中做到这一点,但正在寻求如何使用 PHP 来实现它。
有人可以帮忙吗?
提前致谢 维韦克R
I have a drupal form, and i want to display and error message based on checking a condition, which in-turn should restrict the form submission, when the error message is displayed.
I was able to do this in Javascript, but seeking how to implement it using PHP.
Can anyone help on this?
Thanks in advance
Vivek R
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 hook_validate() 并编写类似于 Javascript 的验证。
use hook_validate() and write your validations similar to Javascript..