0

I'm trying to add an input field along with a drop down in an Angular Bootstrap Dialog box and am just not getting it. When a certain item is selected from the drop down an input field will display where the user will enter in the amount. For now I want to just try passing the value from the input box back from boostrap.dialog.js to postReasonsController.js. The reasons are pulling from one table and the input value will be stored in a separate table along with the selected reason id. This is an inherited project that I did not create so I'm a bit of a newb learning off the side of my desk.

EDIT

I've added sample code to plnkr http://plnkr.co/edit/oJdax2LhlKWxSpRkH0fq?p=preview. In the sample code I ended up using

vm.currentTransaction.ReasonDiscrepencyAmount = document.getElementById('amount').value;

Which works there as well as when running it locally. However, adding the same in my actual code it doesn't work. I'm not sure why it works in my sample code but not in my application.

Can anyone see what the issue is?

8
  • Make a fiddle or plnkr in order to be able to test it! Commented May 17, 2016 at 4:45
  • I'm testing it in VS Commented May 17, 2016 at 14:47
  • Make it possible for us to test as well in order to find the solution! Commented May 17, 2016 at 17:26
  • Sorry this took so long. I've added it to plnkr. When the modal opens select the second option in dropdown and click ok. When the second modal opens select "reason 3 - amount". An input field will appear. How do I get the value entered in that field back to the controller. Commented Jun 15, 2016 at 19:58
  • I ended up using document.getElementById('amount').value in the controller. I've updated the above plnkr. Not sure if there is a different way of doing this or what... Commented Jun 15, 2016 at 20:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.