## YXcms表单页表单标签
~~~
<form action="{url('extend/index',array('id'=>$id))}" method="post">
<input type="text" name="自定义字段名" value="">
<input type="text" name="checkcode" size="4"> <img src="{url('index/verify')}" height="20" width="50" style=" cursor:hand;">
</form>
~~~
## YXcms表单页默认模版验证码标签
~~~
<input type="text" name="checkcode" id="checkcode" class="intext" size="4"> <img src="{url('index/verify')}" height="20" width="50" style=" cursor:hand;" alt="如果您无法识别验证码,请点图片更换" onclick="fleshVerify()" id="verifyImg">
<script type="text/javascript">
function fleshVerify()
{
var timenow = new Date().getTime();
document.getElementById('verifyImg').src= "{url('index/verify')}/"+timenow;
}
</script>
表单页默认模版验证码标签,及点击验证码图片更换js
~~~
## YXcms表单页默认留言本留言调用
~~~
{loop $list $vo}
{$vo['tname']} - 留言者
{$vo['ip']} - 留言用户IP
{date($vo['addtime'],Y-m-d H:m:i)} - 留言时间
{html_out($vo['content'])} - 留言内容
{$vo['reply']} - 管理员回复
{$vo['自定义字段']} - 表单其他字段内容
{/loop}
以下为列表页分页调用标签
{$page}
建议使用默认模版分页样式,按需修改默认模版对应css即可
<div class="pagelist yx-u">{$page}</div>
<style type="text/css">
DIV.pagelist { margin:10px 0; padding:0 10px; TEXT-ALIGN: center; clear:both;}
DIV.pagelist a,DIV.pagelist SPAN{_border:1px solid #CCC;box-shadow:0 1px 5px rgba(0, 0, 0, .25);-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, .25);-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, .25);height:20px; line-height:20px;TEXT-DECORATION: none; color:#136fa0; display:block; float:left; padding:0 5px; margin-left:5px;_border:1px solid #CCC;}
DIV.pagelist A:hover { BACKGROUND: #136fa0; COLOR: #FFF;}
DIV.pagelist A:on { BACKGROUND: #136fa0; COLOR: #FFF;}
DIV.pagelist A:active { BACKGROUND:#136fa0;COLOR: #FFF;}
DIV.pagelist SPAN.current {FONT-WEIGHT: bold; BACKGROUND: #136fa0; COLOR: #fff; }
DIV.pagelist SPAN.disabled {}
.yx-u { display: inline-block; zoom: 1; *display: inline; /* IE < 8: fake inline-block */ letter-spacing: normal; word-spacing: normal; vertical-align: top;}
</style>
~~~
## YXcms默认模版用户评论表单
~~~
<form action="{url('extend/index',array('id'=>$id))}" method="post" id="info" >
<table class="form_box">
{for $i=1;$i<count($tableinfo);$i++}
<tr>
<td align="right" width="150">{$tableinfo[$i]['name']}:</td>
<td align="left">
{if $tableinfo[$i]['type']==1} <!--单行文本-->
<input type="text" name="{$tableinfo[$i]['tableinfo']}" value="">
{elseif $tableinfo[$i]['type']==2}<!--多行文本-->
<textarea name="{$tableinfo[$i]['tableinfo']}" style="width:300px !important; height:80px"></textarea>
{elseif $tableinfo[$i]['type']==3}<!--大型文本-->
<textarea class="editori" name="{$tableinfo[$i]['tableinfo']}" style="width:100%;height:250px;visibility:hidden;"></textarea>
{elseif $tableinfo[$i]['type']==4}<!--下拉列表(可改造为单选按钮)-->
<select name="{$tableinfo[$i]['tableinfo']}" >
<?php $chooses=explode("\r\n",$tableinfo[$i]['defvalue']); ?>
{loop $chooses $vo}
<?php $voar=explode(",",$vo);?>
<option value="{$voar[0]}">{$voar[1]}</option>
{/loop}
</select>
{elseif $tableinfo[$i]['type']==5}<!--上传框(用户可以上传文件,不建议使用)-->
<input name="{$tableinfo[$i]['tableinfo']}" id="{$tableinfo[$i]['tableinfo']}" type="text" value="" />
<iframe scrolling="no"; frameborder="0" src="{url("extend/file",array('inputName'=>$tableinfo[$i]['tableinfo']))}" style="width:300px; height:30px;"></iframe>
{elseif $tableinfo[$i]['type']==6}<!--多选按钮-->
<?php $chooses=explode("\r\n",$tableinfo[$i]['defvalue']); ?>
{loop $chooses $vo}
<?php $voar=explode(",",$vo);?>
{$voar[1]} <input type="checkbox" name="{$tableinfo[$i]['tableinfo']}[]" value="{$voar[0]}" />
{/loop}
{/if}
</td>
</tr>
{/for}
<tr>
<td align="right">验证码:</td>
<td>
<input type="text" name="checkcode" id="checkcode" class="intext" size="4"> <img src="{url('index/verify')}" border="0" height="25" width="50" style=" cursor:hand;" alt="如果您无法识别验证码,请点图片更换" onClick="fleshVerify()" id="verifyImg"/>
</td>
</tr>
<tr>
<td width="150"></td>
<td align="left"> <input type="submit" value="提交" class="yx-button"></td>
</tr>
</table>
</form>
~~~
## YXcms默认模版用户评论表单内容调用
~~~
<table class="table">
<tr>
{for $i=1;$i<count($tableinfo);$i++}
<th> {$tableinfo[$i]['name']} </th>
{/for}
</tr>
{loop $list $vo}
<tr>
{for $i=1;$i<count($tableinfo);$i++}
<td> {html_out($vo[$tableinfo[$i]['tableinfo']])} </td>
{/for}
</tr>
{/loop}
</table>
<div class="pagelist yx-u">{$page}</div>
~~~