Insight into eDir-CMS (Composed by Wing and EA) - 2
来源:互联网 发布:sai软件无毒下载 编辑:程序博客网 时间:2024/06/01 07:58
Form Submit on Company Editor and Room Editor
company editing:
On the client side, there are drop-down list and check box in the form:
<form action="company_rec.php" method="post" id="form-company"> <fieldset class="companyform"> <input name="action" type="hidden" value="edit" /> <input name="save" type="hidden" value="edit" /> <input name="save" type="hidden" value="edit" /> <input name="cmp_id" id="cmp_id" type="hidden" value="2" /> <table border="0"> <tr> <td valign="top"><label>Rooms</label></td> <td><table border="0"><tr><th style="padding:0 5px;">Floor</th><th style="padding:0 5px;">Room</th></tr><tr><td style="padding:0 5px;"><select name='floor_id' id='floor_id' style='min-width:50px'><option value="">No floor</option><option value='1' selected>G</option><option value='2' >P</option><option value='3' >3</option><option value='4' >4</option><option value='5' >5</option><!--....--></select></td><td style="padding:0 5px;"><select name='room_id' id='room_id' style='min-width:50px'><option value="">No room</option><option value='1' >01</option><option value='2' >02</option><!--....--></select></td></tr></table></td> </tr> <tr> <td valign="top"><label>Name(English)</label></td> <td><input name="eng_name" size="30" type="text" value="" /></td> </tr> <tr> <td valign="top"><label>Name(Traditional Chinese)</label></td> <td><input name="chi_name"size="30" type="text" value="華" /></td> </tr> <tr> <td valign="top"><label>Description</label></td> <td><textarea name="descp" rows="8" cols="15" class="tinymce xhedit"><p>G樓105室 / G/F Shop 105</p></textarea></td> </tr> <tr> <td valign="top"><label>Amt of Strokes of 1st Traditional Chinese Char</label></td> <td><input name="amt_stroke" class="inputbox" size="30" type="text" value="12" /></td> </tr> <tr> <td valign="top"><label>Name(Simplified Chinese)</label></td> <td><input name="schi_name" size="30" type="text" value="" /></td> </tr> <tr> <td valign="top"><label>Description(Simplified Chinese)</label></td> <td><textarea name="sdescp" rows="8" cols="15" class="tinymce xhedit"><p>G Shop 105</p></textarea></td> </tr> <tr> <td valign="top"><label>Amt of Strokes of 1st Simplified Chinese Char</label></td> <td><input name="samt_stroke"size="30" type="text" value="6" /></td> </tr> <tr> <td valign="top"><label>是否啟用設備默認字體</label></td> <td><select name="is_def_font"><option value="1">YES</option><option value="0" selected>NO</option></select></td> </tr> <tr><td style="border:0"> </td><td style="border:0"><button class="ui-button ui-widget ui-state-default ui-corner-all" onclick="document.getElementById('form-company').submit();"><span class="ui-icon ui-icon-disk"></span>Submit</button></td> </tr> </table> </fieldset> </form>
We would change the field for 'is_def_font' fromSELECT to CHECK BOX:
<td><input type="checkbox" value="1" name="is_def_font" class="checkbox"> <label for="cbdemo2">啟用</label></td>
And that won't cause any change on the server side code, here is a reference to check box in PHP.
http://note.ajneok.org/programing_note/php/php-get-checkbox/
http://www.html-form-guide.com/php-form/php-form-checkbox.html
On the server side, we still just use $_POST["is_def_font"] to get the string value from user submitting. Besides, plz note that, if the option ofSELECT does not have value attribute set, the text will be got by PHP instead.
- Insight into eDir-CMS (Composed by Wing and EA) - 2
- Insight into eDir-CMS (Composed by Wing and EA) - 1
- Practical Insight into Cmmi
- Insight into Joomla! (preface)
- JTAG - Insight into JTAG
- WING
- CMS-by-Asp.net
- An Insight into UIQ 3 Concepts
- Insight into GNU/Linux boot process
- Interesting insight into Overwatch Tech Art
- EA
- Ea
- EA
- EA
- The Building Blocks- Components of EA Part 2- Process, People, Network and Time
- Insert into select and select into
- source insight and artistic style
- Insight Segmentation and Registration Toolkit
- Java英文面试题(核心知识篇)
- Sql Server临时表
- POJ-2195 最小费用最大流模板题
- Access打开出现正在准备安装,正在配置报错的解决办法
- 模板 n维矩阵的二分幂
- Insight into eDir-CMS (Composed by Wing and EA) - 2
- Struts运行机制
- sql 百万级数据库优化方案
- JAVA英文面试题(15道)
- 【Android.mk】android编译系统makefile文件Android.mk的写法
- 在cmd中FOR的用法
- 关于TScreen::TDataModule没有互斥,在Datasnap中引出的BUG
- Spring + iBatis 1对多表关系配置
- PL/SQL变长数组