当前位置: > 编程笔记 > CMS教程 > 本文内容

织梦dedecms 织梦自定义表单内容列表编辑联动地区显示为数字的解

发布时间:2020-04-19整理:阅读:



解决方法
 
打开 \dede\templets\diy_edit_content.htm 找到
 
01 <?php
02 $formfields = '';
03 foreach($fieldlist as $field=>$fielddata)
04 {
05 $allowhtml = array('htmltext');
06 if($row[$field]==''continue;
07 if($fielddata[1]=='img')
08 {
09 $row[$field] = "<input name='photo' type='file' />  <a href='{$row[$field]}' target='_blank'><img src='images/channeladd.gif' border='0' /> 浏览原图</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原图</a>\r\n";
10 }
11 else if($fielddata[1]=='addon')
12 {
13 $row[$field] = "<input name='file' type='file' />  <a href='{$row[$field]}' target='_blank'><img src='images/channeladd.gif' border='0' /> 浏览原附件</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原附件</a>";
14 }
15 else
16 {
17 if(!in_array($fielddata[1],$allowhtml)){
18 $row[$field] = dede_htmlspecialchars($row[$field]);
19 $row[$field] = "<input type='text' name='".$field."' value='".$row[$field]."'/>";
20 }
21 }
22 echo '<tr bgcolor="#ffffff"><td width="20%" height="24">'.$fielddata[0].':'.'</td><td width="80%">'.$row[$field].'</td></tr>';
23 $formfields .=  $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1];
24 }
25 echo "<input type='hidden' name='dede_fields' value='".$formfields."'>";
26 ?>
这一块PHP代码改成
 
1 <?php
2 echo $postform;
3 ?>

欢迎分享转载→ 织梦dedecms 织梦自定义表单内容列表编辑联动地区显示为数字的解

相关文章

用户评论

精品推荐

月工作计划 年度计划 季度工作计划 销售工作计划

专题文章

图文资讯

点击排行

网站地图 - 辞职报告- 职场指南 - 实习总结 - 实习周记 - 实习鉴定- - 个人总结 - 主持词 - 工作计划