<div>
  <form action="activate" method="post" role="form" style="margin-left: 40%;margin-top: 10%;">
    <fieldset>
      <input type="hidden" value="<%=@cred.id%>" name="id">
    <div class="form-group">
      <input class="form-control" style="width: 250px" type="password" id="password" name="password" placeholder="Password">
    </div><br>
    <div class="form-group">
      <input class="form-control" style="width: 250px" type="password" id="confirm_password" name="password2" placeholder="Re Type Password">
    </div><br>
    <button style="margin-left: 175px" type="submit" class="btn btn-danger">
      Set Password
    </button>
    </fieldset>
  </form>
</div>
<script>
  var password = document.getElementById("password")
      , confirm_password = document.getElementById("confirm_password");

  function validatePassword(){
    if(password.value != confirm_password.value) {
      confirm_password.setCustomValidity("Passwords Don't Match");
    } else {
      confirm_password.setCustomValidity('');
    }
  }

  password.onchange = validatePassword;
  confirm_password.onkeyup = validatePassword;


</script>
<div class="row">
  <div class="col-sm-4 col-sm-offset-4">
    <form action="activate" method="post" role="form">
      <fieldset>
        <input name="id" type="hidden" value="<%=@cred.id%>">
        <div class="form-group">
          <div class="row">
            <div class="col-xs-6">
              <input class="form-control" id="firstname" name="firstname" placeholder="First Name" type="text">
            </div>
            <div class="col-xs-6">
              <input class="form-control" id="lastname" name="lastname" placeholder="Last Name" type="text">
            </div>
          </div>
        </div>
        <div class="form-group">
          <input class="form-control" id="location" name="location" placeholder="Location" type="text">
        </div>
        <div class="form-group">
          <input class="form-control" id="password" name="password" placeholder="Password" type="password">
        </div>
        <div class="form-group">
          <input class="form-control" id="confirm_password" name="password2" placeholder="Re Type Password" type="password">
        </div>
        <button class="btn btn-danger" type="submit">
          Set Password
        </button>
      </fieldset>
    </form>
  </div>
</div>
<script>
  var password = document.getElementById("password");
  var confirm_password = document.getElementById("confirm_password");

  function validatePassword() {
    if (password.value != confirm_password.value) {
      confirm_password.setCustomValidity("Passwords Don't Match");
    } else {
      confirm_password.setCustomValidity('');
    }
  }
  password.onchange = validatePassword;
  confirm_password.onkeyup = validatePassword;
</script>

Add more fields to the activation form
Add more fields to the activation form
