# How to make the input filed in the ionic form as read only?

**URL:** <https://forum.ionicframework.com/t/how-to-make-the-input-filed-in-the-ionic-form-as-read-only/68361>\
**Category:** ionic-v3\
**Created:** [October 27, 2016, 7:17am UTC](https://forum.ionicframework.com/t/how-to-make-the-input-filed-in-the-ionic-form-as-read-only/68361 "2016-10-27T07:17:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dattukapli](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dattukapli](https://forum.ionicframework.com/u/dattukapli)\
**Post date:** [October 27, 2016, 7:17am UTC](https://forum.ionicframework.com/t/how-to-make-the-input-filed-in-the-ionic-form-as-read-only/68361/1 "2016-10-27T07:17:02Z")

</div>

please help me i am trying to make the input field as read only . tried with this code but not working

view:

```auto
      <ion-input type="text" [readonly]="readonly"
            name="branch_no" [(ngModel)]="user.BRANCH_ID" >
      </ion-input>

```

ts file:

```auto
export class CustomerInfo{

 readonly:boolean;

 constructor(){
   this.readonly=true

  }
}

```

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [October 27, 2016, 7:21am UTC](https://forum.ionicframework.com/t/how-to-make-the-input-filed-in-the-ionic-form-as-read-only/68361/2 "2016-10-27T07:21:38Z")

</div>

> <https://github.com/ionic-team/ionic/issues/6408>

---

<div class="post-metadata">

**Author:** ![dattukapli](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dattukapli](https://forum.ionicframework.com/u/dattukapli)\
**Post date:** [October 27, 2016, 7:22am UTC](https://forum.ionicframework.com/t/how-to-make-the-input-filed-in-the-ionic-form-as-read-only/68361/3 "2016-10-27T07:22:56Z")

</div>

still the bug is not fixed ?

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 27, 2016, 8:20am UTC](https://forum.ionicframework.com/t/how-to-make-the-input-filed-in-the-ionic-form-as-read-only/68361/4 "2016-10-27T08:20:09Z")

</div>

Maybe a workaround is not displaying an ion-input when the field is readonly?

like

```
<ion-input *ngIf="!readonly" ....>

<label class="mystyle" *ngIf="readonly"...>

```

Or something like that, just an idea
