Clicking "edit" will show the form in HTML below:
<div ng-repeat="item in items">
<input type="text" placeholder="{{item.questionPlaceholder}}" ng-model="form.g1tags[item.tags_index]" required>
<input ng-class="{'blockInput': !item.inlineChecked}" type="text" placeholder="enter text..." ng-model="form.g1tags_desc[item.tags_index]" required>
<input type="hidden" name="Group1" value="1">
</div>
<button class="addfields" ng-click="addG1Choice()">Add fields</button>
Check out the function in my Angular controller:
$scope.edit = function(id){
dataFactory.httpRequest('items/'+id+'/edit').then(function(data) {
//console.log(data);
$scope.form = data;
for(var key in data) {
var tags = data[key];
}
for(var i = 0; i < tags.length; i++){
tag = tags[i];
//console.log(tag['name']);
$scope.tags_index += 1;
$scope.items.push({
tags_index: $scope.tags_index,
tag_name: tag['name'],
inlineChecked: false,
question: "",
questionPlaceholder: tag['name'],
text: ""
});
$scope.form.g1tags = 'aaaaaaaaaaaaaaaaaaaaaaaaab';
console.log ($scope.form.g1tags);
}
});
}
The textfield seems to only display the first character of 'aaaaaaaaaaaaaaaaaaaaaaaaab'. Can anyone help with what could be causing this issue?