织梦的自定义表单内容列表,如果你使用了联动类型字段,那么在编辑表单内容时是直接显示为数字的。
自定义表单列表编辑内容联动地区显示为数字
解决方法
打开 \dede\templets\diy_edit_content.htm 找到
03 | foreach($fieldlist as $field=>$fielddata) |
05 | $allowhtml = array( 'htmltext' ); |
06 | if ($row[$field]== '' ) continue ; |
07 | if ($fielddata[1]== 'img' ) |
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" ; |
11 | else if ($fielddata[1]== 'addon' ) |
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>" ; |
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]. "'/>" ; |
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]; |
25 | echo "<input type='hidden' name='dede_fields' value='" .$formfields. "'>" ; |
|
这一块PHP代码改成。
完成后效果
感谢你的支持,我会继续努力!
扫码打赏,建议金额1-10元
Powered By 畅言云评
提醒:打赏金额将直接进入对方账号,无法退款,请您谨慎操作。