# Disable InputText

**URL:** <https://forum.babylonjs.com/t/disable-inputtext/10497>\
**Category:** Questions\
**Created:** [May 2, 2020, 9:10pm UTC](https://forum.babylonjs.com/t/disable-inputtext/10497 "2020-05-02T21:10:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oswald](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oswald/32/7923_2.png) [@Oswald](https://forum.babylonjs.com/u/Oswald)\
**Post date:** [May 2, 2020, 9:10pm UTC](https://forum.babylonjs.com/t/disable-inputtext/10497/1 "2020-05-02T21:10:20Z")

</div>

Hi,

I’d like to block an InputText from being edited, is there a simple and clean way to do this ?  
Right now I’m thinking of something like `'onTextChangedObservable' -> myInputText.text = savedText`, but that’s not very graceful…

My situation is that I have a scene that serves as a form, using various interaction modes to receive inputs from the user (including an InputText on a mesh).  
What I’d like to do is block the InputText when the user moves on to another “input station” (the InputText might still be visible depending on the canvas aspect ratio, so I would like not to simply hide/disable it).  
And if the user wants to come back to the InputText, I can enable it again.

Does it make sens ?

Thanks !

---

<div class="post-metadata">

**Author:** ![Oswald](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oswald/32/7923_2.png) [@Oswald](https://forum.babylonjs.com/u/Oswald)\
**Post date:** [May 3, 2020, 7:58am UTC](https://forum.babylonjs.com/t/disable-inputtext/10497/3 "2020-05-03T07:58:04Z")

</div>

That’s a solution, I would still need to make sure it loses the focus (my app requires to click a button to move to the next step, so I can assume to focus will have been lost at that point, but it’s sort of a lucky coincidence - I don’t like that in programming…).

---

<div class="post-metadata">

**Author:** ![Oswald](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oswald/32/7923_2.png) [@Oswald](https://forum.babylonjs.com/u/Oswald)\
**Post date:** [May 3, 2020, 8:44am UTC](https://forum.babylonjs.com/t/disable-inputtext/10497/5 "2020-05-03T08:44:48Z")

</div>

Makes it disappear, so still not good 😉

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 4, 2020, 3:43pm UTC](https://forum.babylonjs.com/t/disable-inputtext/10497/6 "2020-05-04T15:43:50Z")

</div>

There is no out of the box way to do it (but we could add it if you want to send a PR) 🙂

---

<div class="post-metadata">

**Author:** ![Oswald](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oswald/32/7923_2.png) [@Oswald](https://forum.babylonjs.com/u/Oswald)\
**Post date:** [May 5, 2020, 12:11pm UTC](https://forum.babylonjs.com/t/disable-inputtext/10497/7 "2020-05-05T12:11:46Z")

</div>

I’ll look into it, I’ll let you know (I guess all input controls could benefit of a ‘disableInput’ method).  
I’m also quite interested in a multiline InputText, so I’ll follow with that [post](https://forum.babylonjs.com/t/gui-textinput-with-multiple-lines/9927) and see if I can slip my ‘disable’ option in the pot.  
If not, I’ll have to spend some time learning TS and proper use of Git (I’m no programmer, just a savvy engineer).
