0

When I select an item from combobox, I want to populate appropriate form for user input. Is it possible? e.g. if a user selects 'Address' from combo box, I want to populate form with address fields else if user selects phone, want to populate form to enter phone details.

RBT
  • 24,161
  • 21
  • 159
  • 240

1 Answers1

0

You should be able to detect the selected option in the combobox and load the appropriate form inside a div.

<select ng-model="combo">
<option value="address">Address</option>
</select>

<div id='form-area'></div>

<script>
// inside you angularjs controller
if($scope.combo === 'address') {
    $('form-area').html('Form Code here...');
}
</script>
Anjul Garg
  • 484
  • 1
  • 4
  • 17