在这里,我想更改此代码的UI设计。我需要在表格视图中显示以下内容。在代码中,某些字段具有相同的名称,名称为ml,name en和info ml,info en和details ml ,详细说明两个similer字段应该在同一行
<div class="form quick-post">
<!-- Edit deity Details-->
<form class="form-horizontal" action="deity_manage.php" method="post">
<!-- Deity id -->
<div class="form-group">
<label class="control-label col-lg-2" for="title"></label>
<div class="col-lg-10">
<input type="hidden" class="form-control" name="deity_id" id="title" value="<?php echo $deity_id;?>">
</div>
</div>
<!-- Name ml -->
<label class="control-label col-lg-2" for="title">Name Ml</label>
<input type="text" class="form-control" name="deity_name_ml" id="deity_name_ml" value="<?php echo $deity_name_ml;?>">
<!--Name en-->
<label class="control-label col-lg-2" for="content">Name En</label>
<input type="text" class="form-control" name="deity_name_en" id="deity_name_en" value="<?php echo $deity_name_en; ?>">
<div style="padding-top:25px"></div>
<!--Info ml-->
<label class="control-label col-lg-2" for="content">Info Ml</label>
<textarea rows="4" cols="50" name="info_ml" ><?php echo $info_ml;?></textarea>
<!--Info en-->
<label class="control-label col-lg-2" for="content">Info En</label>
<textarea rows="4" cols="50" name="info_en" ><?php echo $info_en;?></textarea>
<div style="padding-top:25px"></div>
<!--details_ml -->
<label class="control-label col-lg-2" for="content">Details Ml</label>
<textarea rows="4" cols="50" name="details_ml" ><?php echo $details_ml;?></textarea>
<!--Details en-->
<label class="control-label col-lg-2" for="content">Details En</label>
<textarea rows="4" cols="50" name="details_en" ><?php echo $details_en;?></textarea>
<div style="padding-top:25px"></div>
<!--Mantra ml-->
<label class="control-label col-lg-2" for="content">Mantra Ml</label>
<input type="text" class="form-control" name="mantra_ml" id="mantra_ml" value="<?php echo $mantra_ml;?>">
<!--Mantra en-->
<label class="control-label col-lg-2" for="content">Mantra En</label>
<input type="text" class="form-control" name="mantra_en" id="mantra_en" value="<?php echo $mantra_en;?>">
<div style="padding-top:25px"></div>
<!--God-->
<label class="control-label col-lg-2" for="content">God</label>
<select multiple="true" name="god_id">
<?php while ($row = $sth->fetch(PDO::FETCH_ASSOC)) { ?>
<option <?php if($row['god_id'] == $god_id) { echo "selected='selected'"; } ?> value="<?php echo $row['god_id'];?>">
<?php echo $row['god_name_en']; ?>
</option>
<?php } ?>
</option>
</select>
<div style="padding-top:25px"></div>
<!--Display order-->
<label class="control-label col-lg-2" for="content">Display Order</label>
<input type="text" class="form-control" name="display_order" id="display_order" value="<?php echo $display_order;?>">
<div style="padding-top:25px"></div>
<!-- Buttons -->
<div class="form-group">
<!-- Buttons -->
<div class="col-lg-offset-2 col-lg-9">
<button type="submit" class="btn btn-danger" name="submit" value="submit"> Save </button>
</div>
</div>
</form>
</div>
</div>
答案 0 :(得分:0)
在标签内提供所有标签和输入类型
<table>
<tr>
<td><label class="control-label col-lg-2" for="content">Details En</label>
</td>
<td>
<textarea rows="4" cols="50" name="details_en" ><?php echo $details_en;?></textarea>
</td>
<Label