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" οnclick="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>

 

 

以上代码,大家可根据自己的实际字段和字段英文名字进行相应修改。

效果图

转载于:https://www.cnblogs.com/jxhgt/p/10985324.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值