showInputAlert change to input field


#1

Hi all,

If I want to disable this Popup(showInputAlert):

showInputAlert() {
    let prompt = this.alertCtrl.create({
      title: 'Add New Item',
      message: "Add a new item to the todo list.",
      inputs: [{ name: 'title', placeholder: 'e.g Buy groceries' }],
      buttons: [
        { text: 'Cancel' },
        {
          text: 'Add',
          handler: data => {
            this.todoService.add(data.title, []).subscribe(
              response => {
                let todo: Todo = {
                  name: data.title,
                  done: false,
                  tags: []
                };
                this.todos.unshift(todo)
              }
            );
          }
        }
      ]
    });
    prompt.present();
  }

to a normal html inputfield(so no popup), how can I do that. The showInputAlert is in the page.ts file and what I want is that a input field in the page.html file wil do the same.

I guess the inputs: [{ name: ‘title’, placeholder: ‘e.g Buy groceries’ }], is the part what is the “field” for now


#2

This may be what you’re looking for (Forms)