<?php
class 表單名字 extends \Poscms\Home\Form {
public function __construct() {
parent::__construct();
}
public function index() {
if (IS_POST && \Poscms\Service::M()->table($this->form_model->prefix.'_'.$this->form['table'])->where('title', dr_safe_replace($_POST['data']['title']))->getRow()) {
$this->call_msg(fc_lang('標題title重復了,不能提交'));
}
$this->_post();
}
}
要自己寫函數,然后把函數名字填寫到這里,就行,關鍵是自己怎么去寫這個函數
回復@長沙小陳 字段是 默認的 標題字段 可以 給寫個例子嗎?
如果標題重復 禁止提交留言,為什么要改這里呢?
回復@長沙小陳這里不是 自帶了嗎 想了解下這個 功能
diy/app/form/controllers/表單名字.php