saribe / eModal

Easy Modal for bootstrap, is a simple way to create modal dialogs using javascript.
http://saribe.github.io/eModal
271 stars 97 forks source link

Get value from input into prompt() #49

Closed landito82 closed 8 years ago

landito82 commented 8 years ago

How to get the input value in prompt()?

To be used in the callback

saribe commented 8 years ago

It is solved as a promise, resolved if press ok, reject if press cancel!

eModal.prompt('whats up') .then( value => alert('OK '+ value), cancel => alert('Cancel '+ cancel) );