I am working on a class project and I have a webpage to do search: http://ada.uprrp.edu/~ehazim/hpcf_proj/basicsearch.html
Here is the basic code:
<html>
<head> <title>Search HPCF Inventory</title>
</head>
<body>
<h1> Search </h1>
<form action="results.php" method="POST">
Choose Search Type: <br />
<select name="searchtype">
<option value="ip"> IP Adress </option>
<option value="ss_name"> Software Services </option>
<option value="IS"> ISBN </option>
</select>
<br />
Enter Search Term:<br />
<input name="searchterm" type="text">
<br />
<input type="submit" value="Search">
</form>
</body>
</html>
Now, I want to make it "pretty" using bootstrap 3. I want exactly what I have in my webpage but to be honest, I don't understand the forms of bootstrap (I am new with webpages), mainly how to say that it is by POST and how to put the variable names. I have been looking for this in websites like this: http://bootsnipp.com/forms?version=3
Which looks really cool, but I don't understand how to edit it... Can someone share the necessary code to have the exact thing that I have in my webpage using bootstrap?
Thanks.
Read through and follow the example at http://getbootstrap.com/css/#forms
So, would end up being
<form action="results.php" method="POST" role="form" class="form-horizontal">
<div class="form-group">
<label for="searchterm" class="col-sm-2 control-label">Choose Search Type</label>
<select name="searchtype" class="form-control">
<option value="ip"> IP Adress </option>
<option value="ss_name"> Software Services </option>
<option value="IS"> ISBN </option>
</select>
</div>
<div class="form-group">
<label for="searchterm" class="col-sm-2 control-label">Choose Search Term</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="searchterm" name="searchterm">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Search</button>
</div>
</div>
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With