0
我有一個表格一個模式裏面,這是什麼樣子: 實現網格系統的引導模式窗體
我的代碼是:
<div class="modal fade" id="addContactModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Add Contact</h4>
</div>
<form action="addcontact.php" method="POST">
<div class="modal-body">
<div class="form-group">
<label for="contactfname">First Name</label>
<input type="text" class="form-control" id="contactfname" name="txt_fn" required>
</div>
<div class="form-group">
<label for="contactmname">Middle Name</label>
<input type="text" class="form-control" id="contactmname" name="txt_mn" required>
</div>
<div class="form-group">
<label for="contactlname">Last Name</label>
<input type="text" class="form-control" id="contactlname" name="txt_ln" required>
</div>
<div class="form-group">
<label for="contactea">Email Address</label>
<input type="email" class="form-control" id="contactea" name="txt_ea" required>
</div>
<div class="form-group">
<label for="contactnum">Mobile Number</label>
<input type="text" class="form-control" id="contactnum" name="txt_num" required>
</div>
<div class="form-group">
<label for="contactgroup">Select Group</label>
<select name="txt_group" class="form-control" id="contactgroup" required>
<option value="">Choose group...</option>
<?php
require 'conn.php';
try {
$data = $conn->query("SELECT * FROM tbl_groups");
foreach($data as $row) {
?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['groupname']; ?></option>
<?php
} } catch (PDOException $e) {
echo 'ERROR: ' . $e->getMessage();
}
?>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<input type="submit" name="addgroupbtn" class="btn btn-primary" value="Save Contact">
</div>
</form>
</div>
</div>
</div>
然而,當屏幕小,它不適合,看起來很亂。而我想做的事情是這樣的:
這是可能的一個模式裏面?任何幫助將非常感激。