<div class="row"> <div class="col-md-6"><input class="form-control required" name="name" pattern="[a-zA-Z0-9 ]+" type="text" placeholder="Name"></div> <div class="col-md-6"><input class="form-control email required" name="email" type="email" placeholder="Email"></div> </div> <div class="row"> <div class="col-md-12"><textarea class="form-control required" name="message" placeholder="Message"></textarea></div> </div> <div class="row"> <div class="col-md-12"><input class="btn btn-primary form-control" type="submit" value="Send Message"></div> </div> </form> </div> <div class="col-md-4 side"> <?php if ($attachments->exist() && $attachments->total() > 1) { $attachments->rewind(); ?> <div class="row" id="gallery-controls"> <?php while ($index = $attachments->get()) { ?> <div class="col-md-6<?php if ($index->id == $attachments->id(0)) { ?> active<?php } ?> "> <div class="thumbnail<?php if ($index->id == $attachments->id(0)) { ?>