<!DOCTYPE html>
<html>
  <head>
    <script src="//code.angularjs.org/1.2.0-rc.3/angular.min.js"></script>
    <script src="//code.jquery.com/jquery.min.js"></script>
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap-theme.min.css">
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script>
  </head>

  <body ng-app>
    <form name="myForm" class="form-horizontal">
      <div class="form-group" ng-class="{'has-error': myForm.name.$invalid, 'has-success': myForm.name.$valid}">
        <label for="name" class="col-sm-2 control-label">Name</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" name="name" placeholder="Name" ng-model="name" required />
          <span class="help-block" ng-show="myForm.name.$invalid && myForm.name.$dirty">
            The name field is required
          </span>
        </div>
      </div>
      <div class="form-group" ng-class="{'has-error': myForm.email.$invalid, 'has-success': myForm.email.$valid}">
        <label for="email" class="col-sm-2 control-label">Email</label>
        <div class="col-sm-10">
          <input type="email" class="form-control" name="email" placeholder="Email address" ng-model="email" ng-required="true" />
          <span class="help-block" ng-show="myForm.email.$invalid && myForm.email.$dirty">
            The email field is required
          </span>
        </div>
      </div>
      <div class="form-group" ng-class="{'has-error': myForm.type.$invalid || myForm.other.$invalid, 'has-success': myForm.type.$valid && myForm.other.$valid}">
        <div class="col-sm-offset-2 col-sm-10">
          <div class="radio">
            <label>
              <input type="radio" name="type" value="feature" ng-model="type" ng-init="type = 'feature'" required /> Feature
            </label>
          </div>
          <div class="radio">
            <label>
              <input type="radio" name="type" value="bug" ng-model="type" required /> Bug
            </label>
          </div>
          <div class="radio">
            <label><input type="radio" name="type" value="other" ng-model="type" required />Other,</label> 
            <input type="text" name="other" placeholder="Please specify" ng-model="other" ng-disabled="type != 'other'" ng-required="type == 'other'" />
          </div>
          <span class="help-block" ng-show="myForm.other.$invalid">
            Please specify the nature of your inquiry
          </span>
        </div>
      </div>
      <div class="form-group" ng-class="{'has-error': myForm.message.$invalid, 'has-success': myForm.message.$valid}">
        <label for="message" class="col-sm-2 control-label">Message</label>
        <div class="col-sm-10">
          <textarea class="form-control" name="message" placeholder="Message" ng-model="message" required></textarea>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit" class="btn btn-primary" ng-disabled="myForm.$invalid">Send</button>
        </div>
      </div>
    </form>
  </body>
</html>