Popup prompt multiline


#1

Hi,

in $ionicPopup.prompt, is there a way to have a multiline input field?
Also is there a way to prepend something to the input text? (like in twitter when you click “tweet to @ionicframework” the twitter handle is auto-attached as a prefix to the tweet)

Thanks!


#2

          var x = "Twitter!";

          $scope.showConfirm = function() {
            $ionicPopup.confirm({
              title: 'Consume Ice Cream',
              content: 'Are you sure you want<br/> to eat this ice cream on ' + x
            }).then(function(res) {
              if(res) {
                console.log('You are sure');
              } else {
                console.log('You are not sure');
              }
            });


#3

Thanks Calendee!
I think I need to rephrase my questions:

  1. Is it possible to have a texarea in a popup instead of a <input type="text">?
  2. Is it possible to obtain something like:<input type="text" value="John">in a popup input field?

Thanks!


#4

Just look at the “Multiple” code. It shows using an HTML template for the popup that includes a text field.

Dabble with it a bit to get what you want.


#5

Awesome! Ionic is fantastic, but I’m pretty sure you already know it :smile: