【发布时间】:2015-02-10 17:24:02
【问题描述】:
我想知道是否有办法将字段的一些声明或注释添加到杂货店创建表单中,以阐明用户应在一些棘手的字段中输入哪些信息。
例如对于“招聘决定”字段,我想添加注释“请在字段中填写您所在地区负责批准招聘的人员的姓名”
我希望我能在 GroceryCrud 中找到一种方法。谢谢。
【问题讨论】:
标签: php forms crud grocery-crud
我想知道是否有办法将字段的一些声明或注释添加到杂货店创建表单中,以阐明用户应在一些棘手的字段中输入哪些信息。
例如对于“招聘决定”字段,我想添加注释“请在字段中填写您所在地区负责批准招聘的人员的姓名”
我希望我能在 GroceryCrud 中找到一种方法。谢谢。
【问题讨论】:
标签: php forms crud grocery-crud
尝试将此代码添加到您的控制器函数中:
$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');
【讨论】: