# Is this a good practice for login form?

**URL:** <https://forum.ionicframework.com/t/is-this-a-good-practice-for-login-form/56278>\
**Category:** ionic-v3\
**Created:** [June 30, 2016, 10:07am UTC](https://forum.ionicframework.com/t/is-this-a-good-practice-for-login-form/56278 "2016-06-30T10:07:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielgroh](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@danielgroh](https://forum.ionicframework.com/u/danielgroh)\
**Post date:** [June 30, 2016, 10:07am UTC](https://forum.ionicframework.com/t/is-this-a-good-practice-for-login-form/56278/1 "2016-06-30T10:07:03Z")

</div>

Hi, I would like to know if this is a good way to create a Login page. This is my code:

```
<ion-content>
    <form (ngSubmit)="login(conversationId.value, userId)">
        <ion-item>
            <ion-label floating>Conversations Id</ion-label>
            <ion-input type="text" #conversationId></ion-input>
        </ion-item>

        <ion-item>
            <ion-label floating>User Id</ion-label>
            <ion-input type="text" #userId></ion-input>
        </ion-item>

        <div padding>
            <button block type="submit">join!</button>
        </div>
    </form>
</ion-content>

```

Here is my TypeScript:

```
import {Component} from '@angular/core';
import {NavController} from 'ionic-angular';
import {LoginService} from './login-service';

@Component({
  templateUrl: 'build/pages/login/login.html',
  providers: [LoginService]
})
export class LoginPage {
  constructor(private loginService: LoginService) {

  }

  public login(conversationId: string, userId: string) {
    this.loginService.login(conversationId, userId);
  }
}

```

This works but Chrome gives me the following warning:

> \*It looks like you’re using the old forms module. This will be opt-in in the next RC, and  
> will eventually be removed in favor of the new forms module. For more information, see:  
> [Forms Upcoming Change Proposal](https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub)

Can you give me your inputs of how you use it?

---

<div class="post-metadata">

**Author:** ![beetz12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/beetz12/32/100830_2.png) [@beetz12](https://forum.ionicframework.com/u/beetz12)\
**Post date:** [June 30, 2016, 2:42pm UTC](https://forum.ionicframework.com/t/is-this-a-good-practice-for-login-form/56278/2 "2016-06-30T14:42:31Z")

</div>

Your form works fine. However, as your form gets larger, you probably don’t want to manually pass every input field.

I’d check out this tutorial:

> **[Ionic \[2|3\] | How To Create And Validate Forms](https://www.gajotres.net/ionic-2-how-o-create-and-validate-forms/)**
>
> My blog

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [June 30, 2016, 7:29pm UTC](https://forum.ionicframework.com/t/is-this-a-good-practice-for-login-form/56278/3 "2016-06-30T19:29:08Z")

</div>

> [@danielgroh](#):
>
> This works but Chrome gives me the following warning

Note that as of beta 10, Ionic doesn’t support the new forms module yet, so don’t be in a hurry to use it.
