1

I have a form which make a post. One of the fields is a "inner join" so I need to post the id. So i want to have d.dp_title in my select, but i want the option value to be d.dp_id.

In my DOM-tree (copied from chrome web tools) the options value is not dp_id, it's a auto increment number. Is is possible to change this to dp_id?

<select ng-model="selectedDicipline" name="pr_discipline" ng-options="d.dp_id as d.dp_title  for d in diciplines" class="ng-valid ng-dirty">
    <option value="0" selected="selected">HVAC</option>
    <option value="1">MEP</option>
    <option value="2">Architect</option>
</select>
iConnor
  • 19,997
  • 14
  • 62
  • 97
Joe
  • 4,274
  • 32
  • 95
  • 175
  • 1
    Similar: http://stackoverflow.com/questions/12139152/how-to-set-value-property-in-angularjs-ng-options – tymeJV Sep 23 '13 at 13:17

0 Answers0