AngularJS Example:

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div ng-app>
  <div ng-controller="Ctrl">
    <div ng-repeat="eachItem in data">
      <input type="button" value="add" ng-click="addFields(eachItem)"/>
      <label>{{eachItem.label}}</label>
      <input type="text" />
  </div>
  </div>
</div>

JavaScript

function Ctrl($scope) {
  $scope.data=[];
$scope.data=[{"label":"name","type":"string"},{"label":"email","type":"string"}];
$scope.addFields = function (field) {
   $scope.data.push(field);
  };
}