怎么自定义表单创建数据库表来实现客户留言或者做免费预约的界面
效果图
代码如下:
<div>
<ul>
<form id="myform" method="post" action="http://m.wangjinhai119.com/plus/diy.php" name="myform" onsubmit="return checkForm()" enctype="multipart/form-data">
<input type="hidden" name="action" value="post" />
<input type="hidden" name="diyid" value="1" />
<input type="hidden" name="do" value="2" />
<input type="hidden" name="required" value="name,tel,ystime,keshi,remark" />
<li>姓名:<input type="text" id="name" name='name' value="" style="width:150px;height:22px; line-height:23px; border:1px solid #dbd5cd; background:#ffffff; padding-top:2px;color:#888888" >
<field:name isnull="true" itemname="姓名"></field:name>
</li>
<li>时间:<input type="text" id="ystime" name='ystime' onBlur="if (value=='') {value='请填写您的预约时间'} " onFocus="if(value=='请填写您的预约时间') {value=''}" value="请填写您的预约时间" style="width:150px;height:22px; line-height:23px; border:1px solid #dbd5cd; background:#ffffff; padding-top:2px;color:#888888" title="点击选择" onClick="fPopCalendar(event,this,this)" onFocus="this.select()" readonly="readonly" >
</li>
<li>电话:<input type="text" id="tel" name="tel" value="" style="width:150px;height:22px; line-height:23px; border:1px solid #dbd5cd; background:#ffffff; padding-top:2px;color:#888888" ></li>
<li>科室:
<select name='keshi' ><option value='前列腺'>前列腺</option>
<option value='性功能障碍'>性功能障碍</option>
<option value='生殖感染'>生殖感染</option>
<option value='生殖整形'>生殖整形</option>
<option value='男性不育'>男性不育</option>
</select>
</li>
<li>说明:<textarea class="tex1" name="remark" id="remark"></textarea></li>
<li><input type="submit" name="submit" id="dosubmit" style="width:93px; height:29px;background:url(http://m.wangjinhai119.com/images/tj.jpg) center top no-repeat; border:0; cursor:pointer" value=" ">
</li>
</ul>
<input type="hidden" name="dede_fields" value="name,text;tel,text;ystime,datetime;keshi,select;remark,multitext" />
<input type="hidden" name="dede_fieldshash" value="11eb10e09fd6640396dc66045c43b46f" />
</form>
</div>
如果本文对你有帮助,欢迎打赏本站