phpcms v9修改表单直接在列表中显示字段方法
找到phpcms\modules\formguide\templates,直接修改formguide_info_list.tpl这个文件
如果表单比较多,此方法适合通用字段,比如姓名,手机号码、邮箱等
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('did[]');"></th>
[color=Red] <th width='250' align="center">姓名</th>
<th width='250' align="center">性别</th>
<th width='250' align="center">应聘岗位</th>
<th width='250' align="center">意向工作地</th>
<th width='250' align="center">毕业院校</th>
<th width='250' align="center">期望待遇</th>
<th width='250' align="center">手机</th>
<th width='250' align="center">邮箱</th> [/color]
<th width="250" align="center"><?php echo L('operation')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($datas)){
foreach($datas as $d){
?>
<tr>
<td align="center">
<input type="checkbox" name="did[]" value="<?php echo $d['dataid']?>">
</td>
[color=Green] <td><?php echo $d['talent_name']?> </td>
<td align="center"><?php echo $d['talent_sex']?></td>
<td align="center"><?php echo $d['talent_gangwei']?></td>
<td align="center"><?php echo $d['talent_gongzuodi']?></td>
<td align="center"><?php echo $d['talent_yuanxiao']?></td>
<td align="center"><?php echo $d['talent_daiyu']?></td>
<td align="center"><?php echo $d['talent_phone']?></td>
<td align="center"><?php echo $d['talent_mail']?></td> [/color]
<td align="center"><a href="javascript:check('<?php echo $formid?>', '<?php echo $d['dataid']?>', '<?php echo safe_replace($d['username'])?>');void(0);"><?php echo L('check')?></a> | <a href="?m=formguide&c=formguide_info&a=public_delete&formid=<?php echo $formid?>&did=<?php echo $d['dataid']?>" onClick="return confirm('<?php echo L('confirm', array('message' => L('delete')))?>')"><?php echo L('del')?></a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
以上代码,大家可根据自己的实际字段和字段英文名字进行相应修改。
效果图