【问题标题】:How to add some custom annotations in a create Form in GroceryCrud如何在 GroceryCrud 的创建表单中添加一些自定义注释
【发布时间】:2015-02-10 17:24:02
【问题描述】:

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

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

我希望我能在 GroceryCrud 中找到一种方法。谢谢。

【问题讨论】:

    标签: php forms crud grocery-crud


    【解决方案1】:

    尝试将此代码添加到您的控制器函数中:

            $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');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-21
      • 1970-01-01
      • 2020-03-15
      • 2010-10-03
      • 1970-01-01
      • 1970-01-01
      • 2010-12-04
      • 1970-01-01
      相关资源
      最近更新 更多