如何在GroceryCrud中的创建表单中添加一些自定义注释

时间:2015-02-10 17:24:03

标签: php forms crud grocery-crud

我想知道是否有办法将字段的一些声明或注释添加到groceryCrud创建表单中,以便澄清用户应该在一些棘手的字段中输入哪些信息。

例如,字段'招聘决策'我想添加注释'请在该字段中填写负责批准您所在地区招聘的人员姓名'

我希望我能找到一种方法在GroceryCrud中做到这一点。感谢。

1 个答案:

答案 0 :(得分:0)

尝试将此代码添加到控制器功能中:

        $current_page = $_SERVER['PHP_SELF'];
        $current_page_array = explode('/',$current_page);
        if ( end($current_page_array) =="add")
        $crud->display_as('hiringDecisions','Hiring Decisions <br /><font size="2"><i> Please fill in the field with the name of the person responsible for approving hiring in your area</i></font>');       
        else  $crud->display_as('hiringDecisions','Hiring Decisions');
相关问题